Theorem: propagate_propagate
Proof state before:
case e_self.e__bits.h.e_self.e__carry.zero
α β α' β'✝ : Type
γ δ : β → Type
β' : Type
f : (a : β) → δ a → β'
init_carry : α → Bool
next_bit : (α → Bool) → (β → Bool) → (α → Bool) × Bool
init_carry_x : (a : β) → γ a → Bool
next_bit_x : (a : β) → (γ a → Bool) → (δ a → Bool) → (γ a → Bool) × Bool
x : β' → ℕ → Bool
x✝ : β
⊢ propagateCarry (init_carry_x x✝) (fun c b => (next_bit_x x✝ c b).fst) (fun d => x (f x✝ d)) Nat.zero = fun d =>
    propagateCarry (fun a => Sum.elim init_carry (fun b => init_carry_x b.fst b.snd) a)
      (fun c b =>
        Sum.elim
          (next_bit (c ∘ inl) fun a =>
              (next_bit_x a (fun d => c (inr { fst := a, snd := d })) fun d => b (f a d)).snd).fst
          fun x =>
          Prod.fst (next_bit_x x.fst (fun d => c (inr { fst := x.fst, snd := d })) fun d => b (f x.fst d)) x.snd)
      x Nat.zero (inr { fst := x✝, snd := d })

case e_self.e__bits.h.e_self.e__carry.succ
α β α' β'✝ : Type
γ δ : β → Type
β' : Type
f : (a : β) → δ a → β'
init_carry : α → Bool
next_bit : (α → Bool) → (β → Bool) → (α → Bool) × Bool
init_carry_x : (a : β) → γ a → Bool
next_bit_x : (a : β) → (γ a → Bool) → (δ a → Bool) → (γ a → Bool) × Bool
x : β' → ℕ → Bool
x✝ : β
n : ℕ
ih :
  propagateCarry (init_carry_x x✝) (fun c b => (next_bit_x x✝ c b).fst) (fun d => x (f x✝ d)) n = fun d =>
    propagateCarry (fun a => Sum.elim init_carry (fun b => init_carry_x b.fst b.snd) a)
      (fun c b =>
        Sum.elim
          (next_bit (c ∘ inl) fun a =>
              (next_bit_x a (fun d => c (inr { fst := a, snd := d })) fun d => b (f a d)).snd).fst
          fun x =>
          Prod.fst (next_bit_x x.fst (fun d => c (inr { fst := x.fst, snd := d })) fun d => b (f x.fst d)) x.snd)
      x n (inr { fst := x✝, snd := d })
⊢ propagateCarry (init_carry_x x✝) (fun c b => (next_bit_x x✝ c b).fst) (fun d => x (f x✝ d)) (Nat.succ n) = fun d =>
    propagateCarry (fun a => Sum.elim init_carry (fun b => init_carry_x b.fst b.snd) a)
      (fun c b =>
        Sum.elim
          (next_bit (c ∘ inl) fun a =>
              (next_bit_x a (fun d => c (inr { fst := a, snd := d })) fun d => b (f a d)).snd).fst
          fun x =>
          Prod.fst (next_bit_x x.fst (fun d => c (inr { fst := x.fst, snd := d })) fun d => b (f x.fst d)) x.snd)
      x (Nat.succ n) (inr { fst := x✝, snd := d })
Tactic:
. simp
Proof state after:
case e_self.e__bits.h.e_self.e__carry.succ
α β α' β'✝ : Type
γ δ : β → Type
β' : Type
f : (a : β) → δ a → β'
init_carry : α → Bool
next_bit : (α → Bool) → (β → Bool) → (α → Bool) × Bool
init_carry_x : (a : β) → γ a → Bool
next_bit_x : (a : β) → (γ a → Bool) → (δ a → Bool) → (γ a → Bool) × Bool
x : β' → ℕ → Bool
x✝ : β
n : ℕ
ih :
  propagateCarry (init_carry_x x✝) (fun c b => (next_bit_x x✝ c b).fst) (fun d => x (f x✝ d)) n = fun d =>
    propagateCarry (fun a => Sum.elim init_carry (fun b => init_carry_x b.fst b.snd) a)
      (fun c b =>
        Sum.elim
          (next_bit (c ∘ inl) fun a =>
              (next_bit_x a (fun d => c (inr { fst := a, snd := d })) fun d => b (f a d)).snd).fst
          fun x =>
          Prod.fst (next_bit_x x.fst (fun d => c (inr { fst := x.fst, snd := d })) fun d => b (f x.fst d)) x.snd)
      x n (inr { fst := x✝, snd := d })
⊢ propagateCarry (init_carry_x x✝) (fun c b => (next_bit_x x✝ c b).fst) (fun d => x (f x✝ d)) (Nat.succ n) = fun d =>
    propagateCarry (fun a => Sum.elim init_carry (fun b => init_carry_x b.fst b.snd) a)
      (fun c b =>
        Sum.elim
          (next_bit (c ∘ inl) fun a =>
              (next_bit_x a (fun d => c (inr { fst := a, snd := d })) fun d => b (f a d)).snd).fst
          fun x =>
          Prod.fst (next_bit_x x.fst (fun d => c (inr { fst := x.fst, snd := d })) fun d => b (f x.fst d)) x.snd)
      x (Nat.succ n) (inr { fst := x✝, snd := d })