@@ -42,14 +42,6 @@ section atom
4242addInput Lemmas.
4343-/
4444
45- theorem validIn_addInput (idx : GenericIdx) :
46- idx.validIn aig → idx.validIn aig.addInput.fst := by
47- simp; grind only
48-
49- grind_pattern validIn_addInput => idx.validIn aig.addInput.fst where
50- idx =/= .input aig.addInput.snd
51- idx =/= .node (aig.addInput.snd.getVar aig.addInput.fst)
52-
5345@[simp, grind .]
5446theorem addInput_validIn :
5547 aig.addInput.snd.validIn aig.addInput.fst := by
@@ -60,20 +52,21 @@ theorem addInput_getVar_validIn :
6052 (aig.addInput.snd.getVar aig.addInput.fst).validIn aig.addInput.fst := by
6153 simp
6254
55+ @[simp]
56+ theorem validIn_addInput (idx : GenericIdx) :
57+ idx.validIn aig → idx.validIn aig.addInput.fst := by
58+ simp; grind only
59+
60+ grind_pattern validIn_addInput => idx.validIn aig.addInput.fst where
61+ idx =/= .input aig.addInput.snd
62+ idx =/= .node (aig.addInput.snd.getVar aig.addInput.fst)
63+
6364/-
6465addLatch Lemmas.
6566-/
6667section latch
6768variable {next reset : Lit}
6869
69- theorem validIn_addLatch (idx : GenericIdx) :
70- idx.validIn aig → idx.validIn (aig.addLatch next reset).fst := by
71- simp; grind only
72-
73- grind_pattern validIn_addLatch => idx.validIn (aig.addLatch next reset).fst where
74- idx =/= .latch (aig.addLatch next reset).snd
75- idx =/= .node ((aig.addLatch next reset).snd.getVar (aig.addLatch next reset).fst)
76-
7770@[simp, grind .]
7871theorem addLatch_validIn :
7972 (aig.addLatch next reset).snd.validIn (aig.addLatch next reset).fst := by
@@ -85,6 +78,15 @@ theorem addLatch_getVar_validIn :
8578 (aig.addLatch next reset).fst := by
8679 simp
8780
81+ @[simp]
82+ theorem validIn_addLatch (idx : GenericIdx) :
83+ idx.validIn aig → idx.validIn (aig.addLatch next reset).fst := by
84+ simp; grind only
85+
86+ grind_pattern validIn_addLatch => idx.validIn (aig.addLatch next reset).fst where
87+ idx =/= .latch (aig.addLatch next reset).snd
88+ idx =/= .node ((aig.addLatch next reset).snd.getVar (aig.addLatch next reset).fst)
89+
8890end latch
8991end atom
9092
@@ -94,6 +96,7 @@ addAnd Lemmas.
9496section gate
9597variable {rhs0 rhs1 : Lit} {h0 : rhs0.validIn aig} {h1 : rhs1.validIn aig}
9698
99+ @[simp]
97100theorem validIn_addAnd (idx : GenericIdx) :
98101 idx.validIn aig → idx.validIn (aig.addAnd rhs0 rhs1 h0 h1).fst := by
99102 simp; grind
0 commit comments