case h
f : Bool → Bool → Bool
h : f false false = false
n : ℕ
⊢ binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))
      n =
    bif f false true then n else 0
f : Bool → Bool → Bool
h : f false false = false
⊢ (binaryRec (bif f true false then bit false 0 else 0) fun b n x => bit (f false b) (bif f false true then n else 0)) =
    fun n => bif f false true then n else 0
funext n
case h
f : Bool → Bool → Bool
h : f false false = false
n : ℕ
⊢ ∀ (b : Bool) (n : ℕ),
    binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))
        (bit b n) =
      bif f false true then bit b n else 0
case h
f : Bool → Bool → Bool
h : f false false = false
n : ℕ
⊢ binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))
      n =
    bif f false true then n else 0
apply bitCasesOn n
case h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))
      (bit b n) =
    bif f false true then bit b n else 0
case h
f : Bool → Bool → Bool
h : f false false = false
n : ℕ
⊢ ∀ (b : Bool) (n : ℕ),
    binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))
        (bit b n) =
      bif f false true then bit b n else 0
intro b n
case h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ bit (f false b) (bif f false true then n else 0) = bif f false true then bit b n else 0

case h.h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ bit (f false false) (bif f false true then 0 else 0) = bif f true false then bit false 0 else 0
case h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ binaryRec (bif f true false then bit false 0 else 0) (fun b n x => bit (f false b) (bif f false true then n else 0))
      (bit b n) =
    bif f false true then bit b n else 0
rw [binaryRec_eq]
case h.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0
case h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ bit (f false b) (bif f false true then n else 0) = bif f false true then bit b n else 0
cases b
<;> try rw [h]
<;> induction' fft : f false true
<;> simp [cond]
case h.true.false
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit false (bif false then n else 0) = bif false then bit true n else 0

case h.true.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit true (bif true then n else 0) = bif true then bit true n else 0
case h.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0
cases f false true
case h.true.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit true (bif true then n else 0) = bif true then bit true n else 0
case h.true.false
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit false (bif false then n else 0) = bif false then bit true n else 0

case h.true.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit true (bif true then n else 0) = bif true then bit true n else 0
case h.true.false => simp
no goals
case h.true.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit true (bif true then n else 0) = bif true then bit true n else 0
case h.true.true => simp
case h.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0
case h.true
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit (f false true) (bif f false true then n else 0) = bif f false true then bit true n else 0
rw [h]
<;> induction' fft : f false true
<;> simp [cond]
no goals
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit false (bif false then n else 0) = bif false then bit true n else 0
simp
no goals
f : Bool → Bool → Bool
h : f false false = false
n✝ n : ℕ
⊢ bit true (bif true then n else 0) = bif true then bit true n else 0
simp
case h.h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ bit false 0 = 0
case h.h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ bit (f false false) (bif f false true then 0 else 0) = bif f true false then bit false 0 else 0
rw [h, show cond (f false true) 0 0 = 0 by cases f false true <;> rfl,
    show cond (f true false) (bit false 0) 0 = 0 by cases f true false <;> rfl]
no goals
case h.h
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ bit false 0 = 0
rfl
no goals
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ (bif f false true then 0 else 0) = 0
cases f false true <;> rfl
no goals
f : Bool → Bool → Bool
h : f false false = false
n✝ : ℕ
b : Bool
n : ℕ
⊢ (bif f true false then bit false 0 else 0) = 0
cases f true false <;> rfl