isabelle - Should I use universal quantification in lemma formulation? -
for
datatype natural = 0 | succ natural primrec add :: "natural ⇒ natural ⇒ natural" "add 0 m = m" | "add (succ n) m = succ (add n m)"
i prove
lemma add_succ_right: "⋀ m n. add m (succ n) = succ (add m n)"
for being mathematical, important have universal quantification. however, using fact in simplifier, better without:
lemma add_succ_right_rewrite: "add m (succ n) = succ (add m n)"
what common wisdom these versions, 1 should prefer in circumstances?
isabelle/hol has 3 ways universally quantify on variables in lemma statements:
lemma 1: "⋀m n. add m (succ n) = succ (add m n)" lemma 2: fixes m n shows "add m (succ n) = succ (add m n)" lemma 3: "∀m n. add m (succ n) = succ (add m n)"
additionally, free variables in lemma statements become automatically quantified:
lemma 4: "add m (succ n) = succ (add m n)"
lemmas 1, 2, , 4 yield same theorem, can used in identical ways later on. lemma 3 uses hol universal quantifier instead of quantification meta-logic. therefore, work needed instantiate quantifier in lemma 3. thus, version should used in special circumstances.
the version in lemma 1 dates when isar language not in current state , out-dated. therefore, suggest prefer version 2 (if want explicitly mention quantified variables), or 4 (if not).
Comments
Post a Comment