Proof checking with PVS Book: Chapter 3. A Theory Name: THEORY BEGIN Definitions (types, variables, constants) Axioms Lemmas (conjectures, theorems) END.

Presentation on theme: "Proof checking with PVS Book: Chapter 3. A Theory Name: THEORY BEGIN Definitions (types, variables, constants) Axioms Lemmas (conjectures, theorems) END."— Presentation transcript:

Proof checking with PVS Book: Chapter 3

A Theory Name: THEORY BEGIN Definitions (types, variables, constants) Axioms Lemmas (conjectures, theorems) END Name

Group theory (*, e), where * is the operator and e the unity element. Associativity (G1): (x*y)*z=x*(y*z). Unity (G2): (x*e)=x Right complement (G3): x y x*y=e. Want to prove: x y y*x=e.

Informal proof Choose x arbitrarily. By G3, there exists y s.t. (1) x*y=e. By G3, we have z s.t. (2) y*z=e. y*x=(y*x)*e (by G2) =(y*x)*(y*z) (by (2)) =y*(x*(y*z)) (by G1) =y*((x*y)*z) (by G1) =y*(e*z) (by (1)) =(y*e)*z (by G1) =y*z (by (G2)) =e (by (2))

Example: groups Group: THEORY BEGIN element: TYPE unit: element *: [element, element-> element] left:CONJECTURE FORALL (x: element): EXISTS (y: element): y*x=unit END Group

Axioms associativity: AXIOM FORALL (x, y, z:element): (x*y)*z=x*(y*z) unity: AXIOM FORALL (x:element): x*unit=x complement: AXIOM FORALL(x:element): EXISTS (y:element): x*y=unity

Skolemization Corresponds to choosing some arbitrary constant and proving without loss of generality. Want to prove (…/\…)->(…\/ x (x)\/…). Choose a new constant x. Prove (…/\…)-->(…\/ (x)\/…).

Skolemization Corresponds to choosing some unconstrained arbitrary constant when one is known to exist. Want to prove (…/\ x (x)/\…)-- >(…\/…). Choose a new constant x. Prove (…/\ (x)/\…)-->(…\/…).

Skolem in PVS (skolem 2 (a1 b2 c7)) (skolem -3 (a1 _ c7)) (skolem! -3) invents new constants, e.g., for x will invent x!1, x!2, … when applied repeatedly.

Instantiation Corresponds to restricting the generality. Want to prove (…/\ x (x)/\…)-- >(…\/…). Choose a some term t. Prove (…/\ (t)/\…)-->(…\/…).

Instantiation Corresponds to proving the existence of an element by showing an evidence. Want to prove (…/\…)-- >(…\/ x (x)\/…). Choose some term t. Prove (…/\…)-->(…\/ (t)\/…).

Instantiating in PVS (inst -1 x*y a b+c) (inst 2 a _ x)

Other useful rules (replace -1 (-1 2 3)) Formula -1 is of the form le=ri. Replace any occurrence of le by ri in lines -1, 2, 3. (replace -1 (-1 2 3) RL) Similar, but replace ri by le instead. (assert), (assert -) (assert +) (assert 7) Apply algebraic simplification. (lemma ) - add axiom as additional antecedent.

Download ppt "Proof checking with PVS Book: Chapter 3. A Theory Name: THEORY BEGIN Definitions (types, variables, constants) Axioms Lemmas (conjectures, theorems) END."

Similar presentations