Skip to content

Commit

Permalink
resolve some sorry
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasgrosser committed Dec 23, 2024
1 parent 59851d4 commit 46a9269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 3 additions & 6 deletions SSA/Experimental/Bits/AutoStructs/FiniteStateMachine.lean
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ def one : FSM (Fin 0) :=
ext n
cases n
· rfl
· simp [eval, carry_one, nextBit]
sorry -- TODO: fix this proof

· simp! [eval, carry_one, nextBit, one, mk]

def negOne : FSM (Fin 0) :=
{ α := Empty,
Expand All @@ -410,7 +408,7 @@ def negOne : FSM (Fin 0) :=
@[simp] lemma eval_negOne (x : Fin 0 → BitStream) : negOne.eval x = BitStream.negOne := by
ext; simp [negOne, eval, nextBit]

def ls (b : Bool) : FSM Unit :=
@[simp] def ls (b : Bool) : FSM Unit :=
{ α := Unit,
initCarry := fun _ => b,
nextBitCirc := fun x =>
Expand All @@ -431,8 +429,7 @@ theorem carry_ls (b : Bool) (x : Unit → BitStream) : ∀ (n : ℕ),
ext n
cases n
· rfl
· simp [ls, carry_ls, eval, nextBit, BitStream.concat]
sorry -- TODO: fix this proof
· simp [ls, carry, carry_ls, eval, nextBit, BitStream.concat]

def var (n : ℕ) : FSM (Fin (n+1)) :=
{ α := Empty,
Expand Down
6 changes: 2 additions & 4 deletions SSA/Experimental/Bits/Fast/FiniteStateMachine.lean
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,7 @@ def one : FSM (Fin 0) :=
ext n
cases n
· rfl
· simp [eval, carry_one, nextBit]
sorry
· simp! [eval, carry_one, nextBit, one]

def negOne : FSM (Fin 0) :=
{ α := Empty,
Expand Down Expand Up @@ -595,8 +594,7 @@ theorem carry_ls (b : Bool) (x : Unit → BitStream) : ∀ (n : ℕ),
ext n
cases n
· rfl
· simp [carry_ls, eval, nextBit, BitStream.concat]
sorry
· simp [ls, carry_ls, eval, nextBit, BitStream.concat, carry]

def var (n : ℕ) : FSM (Fin (n+1)) :=
{ α := Empty,
Expand Down

0 comments on commit 46a9269

Please sign in to comment.