case pos
x : ℕ
d : Decidable (x % 2 = 1)
h : x % 2 = 1
⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2

case neg
x : ℕ
d : Decidable (x % 2 = 1)
h : ¬x % 2 = 1
⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2
x : ℕ
d : Decidable (x % 2 = 1)
⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2
by_cases h : x % 2 = 1
no goals
case pos
x : ℕ
d : Decidable (x % 2 = 1)
h : x % 2 = 1
⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2
simp! [*]
no goals
case neg
x : ℕ
d : Decidable (x % 2 = 1)
h : ¬x % 2 = 1
⊢ (bif decide (x % 2 = 1) then 1 else 0) = x % 2
cases mod_two_eq_zero_or_one x <;> simp! [*, Nat.zero_ne_one]