Skip to content

Commit

Permalink
Proofs improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle941 committed Nov 25, 2023
1 parent 96f5f77 commit e9350ed
Showing 1 changed file with 16 additions and 44 deletions.
60 changes: 16 additions & 44 deletions ProvenZk/Gates.lean
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,10 @@ lemma xor_equivalence {a b out : ZMod N} :
simp at h
casesm* (_ ∧ _)
rename_i ha hb _
cases ha
. cases hb
repeat (
subst_vars
simp
)
. cases hb
repeat (
subst_vars
simp
)
cases ha <;> cases hb <;> {
subst_vars
simp
}
. intro h
casesm* (_ ∨ _)
repeat (
Expand All @@ -166,17 +159,10 @@ lemma or_equivalence {a b out : ZMod N} :
simp at h
casesm* (_ ∧ _)
rename_i ha hb _
cases ha
. cases hb
repeat (
subst_vars
simp
)
. cases hb
repeat (
subst_vars
simp
)
cases ha <;> cases hb <;> {
subst_vars
simp
}
. intro h
casesm* (_ ∨ _)
repeat (
Expand All @@ -200,17 +186,10 @@ lemma and_equivalence {a b out : ZMod N} :
simp at h
casesm* (_ ∧ _)
rename_i ha hb _
cases ha
. cases hb
repeat (
subst_vars
simp
)
. cases hb
repeat (
subst_vars
simp
)
cases ha <;> cases hb <;> {
subst_vars
simp
}
. intro h
casesm* (_ ∨ _)
repeat (
Expand Down Expand Up @@ -280,17 +259,10 @@ lemma lookup_equivalence {b0 b1 i0 i1 i2 i3 out : ZMod N} :
. intro h
casesm* (_ ∧ _)
rename_i hb0 hb1 _
cases hb0
. cases hb1
. subst_vars
simp
. subst_vars
simp
. cases hb1
. subst_vars
simp
. subst_vars
simp [add_assoc]
cases hb0 <;> cases hb1 <;> {
subst_vars
simp [add_assoc]
}
. intro h
casesm* (_ ∨ _)
repeat (
Expand Down

0 comments on commit e9350ed

Please sign in to comment.