Theorem: neg_eq_propagate (Lean4bits/lemmas.lean)

State before:
α β α' β' : Type
γ : β → Type
x : ℕ → Bool
⊢ negSeq x =
    propagate (fun x => true) (fun carry bits => (fun x => !bits () && carry (), _root_.xor (!bits ()) (carry ())))
      fun x_1 => x
Tactic:
ext n
State after:
case h
α β α' β' : Type
γ : β → Type
x : ℕ → Bool
n : ℕ
⊢ negSeq x n =
    propagate (fun x => true) (fun carry bits => (fun x => !bits () && carry (), _root_.xor (!bits ()) (carry ())))
      (fun x_1 => x) n

State before:
case h
α β α' β' : Type
γ : β → Type
x : ℕ → Bool
n : ℕ
⊢ negSeq x n =
    propagate (fun x => true) (fun carry bits => (fun x => !bits () && carry (), _root_.xor (!bits ()) (carry ())))
      (fun x_1 => x) n
Tactic:
match n with
| 0 => simp [negSeq, negSeqAux]
| 1 => simp [negSeq, negSeqAux, propagate, propagateAux]
| n+2 => simp [negSeq, negSeqAux, negSeqAux_eq_propagateCarry, propagate_succ]
State after:
no goals

State before:
α β α' β' : Type
γ : β → Type
x : ℕ → Bool
n : ℕ
⊢ negSeq x 0 =
    propagate (fun x => true) (fun carry bits => (fun x => !bits () && carry (), _root_.xor (!bits ()) (carry ())))
      (fun x_1 => x) 0
Tactic:
simp [negSeq, negSeqAux]
State after:
no goals

State before:
α β α' β' : Type
γ : β → Type
x : ℕ → Bool
n : ℕ
⊢ negSeq x 1 =
    propagate (fun x => true) (fun carry bits => (fun x => !bits () && carry (), _root_.xor (!bits ()) (carry ())))
      (fun x_1 => x) 1
Tactic:
simp [negSeq, negSeqAux, propagate, propagateAux]
State after:
no goals

State before:
α β α' β' : Type
γ : β → Type
x : ℕ → Bool
n✝ n : ℕ
⊢ negSeq x (n + 2) =
    propagate (fun x => true) (fun carry bits => (fun x => !bits () && carry (), _root_.xor (!bits ()) (carry ())))
      (fun x_1 => x) (n + 2)
Tactic:
simp [negSeq, negSeqAux, negSeqAux_eq_propagateCarry, propagate_succ]
State after:
no goals