src/Doc/Isar_Ref/Proof.thy
changeset 63285 e9c777bfd78c
parent 63094 056ea294c256
child 63527 59eff6e56d81
equal deleted inserted replaced
63284:c20946f5b6fb 63285:e9c777bfd78c
   157   that causes any hypothetical equation \<open>x \<equiv> t\<close> to be eliminated by the
   157   that causes any hypothetical equation \<open>x \<equiv> t\<close> to be eliminated by the
   158   reflexivity rule. Thus, exporting some result \<open>x \<equiv> t \<turnstile> \<phi>[x]\<close> yields \<open>\<turnstile>
   158   reflexivity rule. Thus, exporting some result \<open>x \<equiv> t \<turnstile> \<phi>[x]\<close> yields \<open>\<turnstile>
   159   \<phi>[t]\<close>.
   159   \<phi>[t]\<close>.
   160 
   160 
   161   @{rail \<open>
   161   @{rail \<open>
   162     @@{command fix} @{syntax "fixes"}
   162     @@{command fix} @{syntax vars}
   163     ;
   163     ;
   164     (@@{command assume} | @@{command presume}) concl prems @{syntax for_fixes}
   164     (@@{command assume} | @@{command presume}) concl prems @{syntax for_fixes}
   165     ;
   165     ;
   166     concl: (@{syntax props} + @'and')
   166     concl: (@{syntax props} + @'and')
   167     ;
   167     ;
   168     prems: (@'if' (@{syntax props'} + @'and'))?
   168     prems: (@'if' (@{syntax props'} + @'and'))?
   169     ;
   169     ;
   170     @@{command define} (@{syntax "fixes"} + @'and')
   170     @@{command define} @{syntax vars} @'where'
   171       @'where' (@{syntax props} + @'and') @{syntax for_fixes}
   171       (@{syntax props} + @'and') @{syntax for_fixes}
   172     ;
   172     ;
   173     @@{command def} (def + @'and')
   173     @@{command def} (def + @'and')
   174     ;
   174     ;
   175     def: @{syntax thmdecl}? \<newline>
   175     def: @{syntax thmdecl}? \<newline>
   176       @{syntax name} ('==' | '\<equiv>') @{syntax term} @{syntax term_pat}?
   176       @{syntax name} ('==' | '\<equiv>') @{syntax term} @{syntax term_pat}?
   415     ;
   415     ;
   416     conclusion: @'shows' stmt | @'obtains' @{syntax obtain_clauses}
   416     conclusion: @'shows' stmt | @'obtains' @{syntax obtain_clauses}
   417     ;
   417     ;
   418     @{syntax_def obtain_clauses}: (@{syntax par_name}? obtain_case + '|')
   418     @{syntax_def obtain_clauses}: (@{syntax par_name}? obtain_case + '|')
   419     ;
   419     ;
   420     @{syntax_def obtain_case}: (@{syntax vars} + @'and') @'where'
   420     @{syntax_def obtain_case}: @{syntax vars} @'where'
   421       (@{syntax thmdecl}? (@{syntax prop}+) + @'and')
   421       (@{syntax thmdecl}? (@{syntax prop}+) + @'and')
   422   \<close>}
   422   \<close>}
   423 
   423 
   424   \<^descr> @{command "lemma"}~\<open>a: \<phi>\<close> enters proof mode with \<open>\<phi>\<close> as main goal,
   424   \<^descr> @{command "lemma"}~\<open>a: \<phi>\<close> enters proof mode with \<open>\<phi>\<close> as main goal,
   425   eventually resulting in some fact \<open>\<turnstile> \<phi>\<close> to be put back into the target
   425   eventually resulting in some fact \<open>\<turnstile> \<phi>\<close> to be put back into the target
  1333   delegated to an Isar proof, which often involves automated tools.
  1333   delegated to an Isar proof, which often involves automated tools.
  1334 
  1334 
  1335   @{rail \<open>
  1335   @{rail \<open>
  1336     @@{command consider} @{syntax obtain_clauses}
  1336     @@{command consider} @{syntax obtain_clauses}
  1337     ;
  1337     ;
  1338     @@{command obtain} @{syntax par_name}? (@{syntax "fixes"} + @'and') \<newline>
  1338     @@{command obtain} @{syntax par_name}? @{syntax vars} \<newline>
  1339       @'where' concl prems @{syntax for_fixes}
  1339       @'where' concl prems @{syntax for_fixes}
  1340     ;
  1340     ;
  1341     concl: (@{syntax props} + @'and')
  1341     concl: (@{syntax props} + @'and')
  1342     ;
  1342     ;
  1343     prems: (@'if' (@{syntax props'} + @'and'))?
  1343     prems: (@'if' (@{syntax props'} + @'and'))?
  1344     ;
  1344     ;
  1345     @@{command guess} (@{syntax "fixes"} + @'and')
  1345     @@{command guess} @{syntax vars}
  1346   \<close>}
  1346   \<close>}
  1347 
  1347 
  1348   \<^descr> @{command consider}~\<open>(a) \<^vec>x \<WHERE> \<^vec>A \<^vec>x | (b)
  1348   \<^descr> @{command consider}~\<open>(a) \<^vec>x \<WHERE> \<^vec>A \<^vec>x | (b)
  1349   \<^vec>y \<WHERE> \<^vec>B \<^vec>y | \<dots>\<close> states a rule for case splitting
  1349   \<^vec>y \<WHERE> \<^vec>B \<^vec>y | \<dots>\<close> states a rule for case splitting
  1350   into separate subgoals, such that each case involves new parameters and
  1350   into separate subgoals, such that each case involves new parameters and