Arc Forumnew | comments | leaders | submitlogin
Metamath-like proof checker as embeded language in arc (github.com)
5 points by fabienh 5054 days ago | 4 comments


1 point by akkartik 5054 days ago | link

Thanks, this led me to discover http://us.metamath.org/mpegif/mmset.html and your implementation of the on lisp examples in arc (http://github.com/fabienhinault/olarc)

-----

1 point by akkartik 5053 days ago | link

Can you provide more detail on the notation in demo?

-----

2 points by fabienh 5052 days ago | link

demo_mm.arc is based on demo0.mm in metamath, which is explained in http://us.metamath.org/downloads/metamath.pdf section 2.2 "Your First Formal System"

$c declares the constants; $v declares the variables; $f are floating hypotheses, used to give types to variables; $a are axiomatic assertions; $p are provable assertions.

demo.mm's content is:

  $( demo0.mm  1-Jan-04 $)

  $(
                        PUBLIC DOMAIN DEDICATION
  
  This file is placed in the public domain per the Creative Commons Public
  Domain Dedication. http://creativecommons.org/licenses/publicdomain/
  
  Norman Megill - email: nm at alum.mit.edu
  
  $)
  
  
  $( This file is the introductory formal system example described
     in Chapter 2 of the Meamath book. $)
  
  $( Declare the constant symbols we will use $)
      $c 0 + = -> ( ) term wff |- $.
  $( Declare the metavariables we will use $)
      $v t r s P Q $.
  $( Specify properties of the metavariables $)
      tt $f term t $.
      tr $f term r $.
      ts $f term s $.
      wp $f wff P $.
      wq $f wff Q $.
  $( Define "term" (part 1) $)
      tze $a term 0 $.
  $( Define "term" (part 2) $)
      tpl $a term ( t + r ) $.
  $( Define "wff" (part 1) $)
      weq $a wff t = r $.
  $( Define "wff" (part 2) $)
      wim $a wff ( P -> Q ) $.
  $( State axiom a1 $)
      a1 $a |- ( t = r -> ( t = s -> r = s ) ) $.
  $( State axiom a2 $)
      a2 $a |- ( t + 0 ) = t $.
      ${
         min $e |- P $.
         maj $e |- ( P -> Q ) $.
  $( Define the modus ponens inference rule $)
         mp  $a |- Q $.
      $}
  $( Prove a theorem $)
      th1 $p |- t = t $=
    $( Here is its proof: $)
         tt tze tpl tt weq tt tt weq tt a2 tt tze tpl
         tt weq tt tze tpl tt weq tt tt weq wim tt a2
         tt tze tpl tt tt a1 mp mp
       $.

-----

1 point by akkartik 5052 days ago | link

Ah, thanks for the pointer!

-----