awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (hypothesis)
Goal:
m n : Num
⊢ m.cmp n = Ordering.eq ↔ m = n
have this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (LT.lt (α := ℕ) (↑m : ℕ) (↑n : ℕ)) (m = n)
  (LT.lt (α := ℕ) (↑n : ℕ) (↑m : ℕ))
Tactic: have := cmp_to_nat m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (hypothesis)
Goal:
m n : Num
this :
  Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (LT.lt (α := ℕ) (↑m : ℕ) (↑n : ℕ)) (m = n)
    (LT.lt (α := ℕ) (↑n : ℕ) (↑m : ℕ))
⊢ m.cmp n = Ordering.eq ↔ m = n
have this₁ : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (m < n) (m = n) (n < m)
Tactic: norm_cast at this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (m < n) (m = n) (n < m)
⊢ m.cmp n = Ordering.eq ↔ m = n
have revert : ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (m < n) (m = n) (n < m)),
  m.cmp n = Ordering.eq ↔ m = n
Tactic: revert this
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
⊢ ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (m < n) (m = n) (n < m)),
    m.cmp n = Ordering.eq ↔ m = n
have lt : ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) Ordering.lt (m < n) (m = n) (n < m)),
  Ordering.lt = Ordering.eq ↔ m = n
Tactic: cases cmp m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
lt :
  ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) Ordering.lt (m < n) (m = n) (n < m)),
    Ordering.lt = Ordering.eq ↔ m = n
⊢ ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (m < n) (m = n) (n < m)),
    m.cmp n = Ordering.eq ↔ m = n
have eq : ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) Ordering.eq (m < n) (m = n) (n < m)),
  Ordering.eq = Ordering.eq ↔ m = n
Tactic: cases cmp m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
lt :
  ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) Ordering.lt (m < n) (m = n) (n < m)),
    Ordering.lt = Ordering.eq ↔ m = n
eq :
  ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) Ordering.eq (m < n) (m = n) (n < m)),
    Ordering.eq = Ordering.eq ↔ m = n
⊢ ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) (m.cmp n) (m < n) (m = n) (n < m)),
    m.cmp n = Ordering.eq ↔ m = n
have gt : ∀ (this : Ordering.casesOn (motive := fun (x : Ordering) ↦ Prop) Ordering.gt (m < n) (m = n) (n < m)),
  Ordering.gt = Ordering.eq ↔ m = n
Tactic: cases cmp m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
⊢ LT.lt.{u_1} (α := α) (↑m : α) (↑n : α) ↔ m < n
have rw : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m < n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_lt (α := α), lt_to_nat]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
rw : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m < n
⊢ LT.lt.{u_1} (α := α) (↑m : α) (↑n : α) ↔ m < n
have rw₁ : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑(↑n : ℕ) : α) ↔ m < n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_lt (α := α), lt_to_nat]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
rw : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m < n
rw₁ : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑(↑n : ℕ) : α) ↔ m < n
⊢ LT.lt.{u_1} (α := α) (↑m : α) (↑n : α) ↔ m < n
have rw₂ : LT.lt (α := ℕ) (↑m : ℕ) (↑n : ℕ) ↔ m < n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_lt (α := α), lt_to_nat]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
rw : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m < n
rw₁ : LT.lt.{u_1} (α := α) (↑(↑m : ℕ) : α) (↑(↑n : ℕ) : α) ↔ m < n
rw₂ : LT.lt (α := ℕ) (↑m : ℕ) (↑n : ℕ) ↔ m < n
⊢ LT.lt.{u_1} (α := α) (↑m : α) (↑n : α) ↔ m < n
have rw₃ : m < n ↔ m < n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_lt (α := α), lt_to_nat]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
⊢ LE.le.{u_1} (α := α) (↑m : α) (↑n : α) ↔ m ≤ n
have rw : ¬LT.lt.{u_1} (α := α) (↑n : α) (↑m : α) ↔ m ≤ n
Tactic: rw [← not_lt]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
⊢ Eq.{u_1 + 1} (α := α) (↑m : α) (↑n : α) ↔ m = n
have rw : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m = n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_inj, to_nat_inj]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
rw : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m = n
⊢ Eq.{u_1 + 1} (α := α) (↑m : α) (↑n : α) ↔ m = n
have rw₁ : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑(↑n : ℕ) : α) ↔ m = n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_inj, to_nat_inj]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
rw : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m = n
rw₁ : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑(↑n : ℕ) : α) ↔ m = n
⊢ Eq.{u_1 + 1} (α := α) (↑m : α) (↑n : α) ↔ m = n
have rw₂ : Eq (α := ℕ) (↑m : ℕ) (↑n : ℕ) ↔ m = n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_inj, to_nat_inj]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
α : Type u_1
inst : Semiring α
inst_1 : PartialOrder α
inst_2 : IsStrictOrderedRing α
m n : Num
rw : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑n : α) ↔ m = n
rw₁ : Eq.{u_1 + 1} (α := α) (↑(↑m : ℕ) : α) (↑(↑n : ℕ) : α) ↔ m = n
rw₂ : Eq (α := ℕ) (↑m : ℕ) (↑n : ℕ) ↔ m = n
⊢ Eq.{u_1 + 1} (α := α) (↑m : α) (↑n : α) ↔ m = n
have rw₃ : m = n ↔ m = n
Tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_inj, to_nat_inj]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
⊢ n.cmp m = Ordering.lt ↔ m.cmp n = Ordering.gt
have rw : (m.cmp n).swap = Ordering.lt ↔ m.cmp n = Ordering.gt
Tactic: rw [← cmp_swap]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
⊢ (m.cmp n).swap = Ordering.lt ↔ m.cmp n = Ordering.gt
have lt : Ordering.lt.swap = Ordering.lt ↔ Ordering.lt = Ordering.gt
Tactic: cases cmp m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
lt : Ordering.lt.swap = Ordering.lt ↔ Ordering.lt = Ordering.gt
⊢ (m.cmp n).swap = Ordering.lt ↔ m.cmp n = Ordering.gt
have eq : Ordering.eq.swap = Ordering.lt ↔ Ordering.eq = Ordering.gt
Tactic: cases cmp m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
m n : Num
lt : Ordering.lt.swap = Ordering.lt ↔ Ordering.lt = Ordering.gt
eq : Ordering.eq.swap = Ordering.lt ↔ Ordering.eq = Ordering.gt
⊢ (m.cmp n).swap = Ordering.lt ↔ m.cmp n = Ordering.gt
have gt : Ordering.gt.swap = Ordering.lt ↔ Ordering.gt = Ordering.gt
Tactic: cases cmp m n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
m n : Num
⊢ (↑(f m n) : ℕ) = Nat.bitwise g (↑m : ℕ) (↑n : ℕ)
have zero : (↑(f zero n) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑n : ℕ)
Tactic: obtain - | m := m
Cleared hypotheses: m
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
m n : Num
zero : (↑(f Num.zero n) : ℕ) = Nat.bitwise g (↑Num.zero : ℕ) (↑n : ℕ)
⊢ (↑(f m n) : ℕ) = Nat.bitwise g (↑m : ℕ) (↑n : ℕ)
have pos : ∀ (m : PosNum), (↑(f (pos m) n) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) (↑n : ℕ)
Tactic: obtain - | m := m
Cleared hypotheses: m
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : Num
⊢ (↑(f zero n) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑n : ℕ)
have zero : (↑(f zero zero) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑zero : ℕ)
Tactic: obtain - | n := n
Cleared hypotheses: n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : Num
zero : (↑(f Num.zero Num.zero) : ℕ) = Nat.bitwise g (↑Num.zero : ℕ) (↑Num.zero : ℕ)
⊢ (↑(f Num.zero n) : ℕ) = Nat.bitwise g (↑Num.zero : ℕ) (↑n : ℕ)
have zero₁ : ∀ (n : PosNum), (↑(f Num.zero (pos n)) : ℕ) = Nat.bitwise g (↑Num.zero : ℕ) (↑(pos n) : ℕ)
Tactic: obtain - | n := n
Cleared hypotheses: n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : Num
m : PosNum
⊢ (↑(f (pos m) n) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) (↑n : ℕ)
have pos : (↑(f (pos m) zero) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) (↑zero : ℕ)
Tactic: obtain - | n := n
Cleared hypotheses: n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (Num.pos n) = bif g false true then Num.pos n else 0
fn0 : ∀ (n : PosNum), f (Num.pos n) 0 = bif g true false then Num.pos n else 0
fnn : ∀ (m n : PosNum), f (Num.pos m) (Num.pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then Num.pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then Num.pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : Num
m : PosNum
pos : (↑(f (Num.pos m) zero) : ℕ) = Nat.bitwise g (↑(Num.pos m) : ℕ) (↑zero : ℕ)
⊢ (↑(f (Num.pos m) n) : ℕ) = Nat.bitwise g (↑(Num.pos m) : ℕ) (↑n : ℕ)
have pos₁ : ∀ (n : PosNum), (↑(f (Num.pos m) (Num.pos n)) : ℕ) = Nat.bitwise g (↑(Num.pos m) : ℕ) (↑(Num.pos n) : ℕ)
Tactic: obtain - | n := n
Cleared hypotheses: n
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
⊢ (↑(f zero zero) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑zero : ℕ)
have zero : (↑(f 0 0) : ℕ) = Nat.bitwise g 0 0
Tactic: simp only [show zero = 0 from rfl, show ((0 : Num) : ℕ) = 0 from rfl]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
⊢ (↑(f zero zero) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑zero : ℕ)
have zero : (↑(f 0 0) : ℕ) = Nat.bitwise g 0 0
Tactic: try simp only [show zero = 0 from rfl, show ((0 : Num) : ℕ) = 0 from rfl]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : PosNum
⊢ (↑(f zero (pos n)) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑(pos n) : ℕ)
have zero : (↑(f 0 (pos n)) : ℕ) = Nat.bitwise g 0 (↑(pos n) : ℕ)
Tactic: simp only [show zero = 0 from rfl, show ((0 : Num) : ℕ) = 0 from rfl]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : PosNum
⊢ (↑(f zero (pos n)) : ℕ) = Nat.bitwise g (↑zero : ℕ) (↑(pos n) : ℕ)
have zero : (↑(f 0 (pos n)) : ℕ) = Nat.bitwise g 0 (↑(pos n) : ℕ)
Tactic: try simp only [show zero = 0 from rfl, show ((0 : Num) : ℕ) = 0 from rfl]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
m : PosNum
⊢ (↑(f (pos m) zero) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) (↑zero : ℕ)
have pos : (↑(f (pos m) 0) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) 0
Tactic: simp only [show zero = 0 from rfl, show ((0 : Num) : ℕ) = 0 from rfl]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
m : PosNum
⊢ (↑(f (pos m) zero) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) (↑zero : ℕ)
have pos : (↑(f (pos m) 0) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) 0
Tactic: try simp only [show zero = 0 from rfl, show ((0 : Num) : ℕ) = 0 from rfl]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
⊢ (↑(f 0 0) : ℕ) = Nat.bitwise g 0 0
have zero : Eq (α := ℕ) (↑0 : ℕ) 0
Tactic: rw [f00, Nat.bitwise_zero]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : PosNum
⊢ (↑(f 0 (pos n)) : ℕ) = Nat.bitwise g 0 (↑(pos n) : ℕ)
have zero : Eq (α := ℕ) (↑(bif g false true then pos n else 0) : ℕ) (if g false true = true then (↑(pos n) : ℕ) else 0)
Tactic: rw [f0n, Nat.bitwise_zero_left]
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : PosNum
⊢ Eq (α := ℕ) (↑(bif g false true then pos n else 0) : ℕ) (if g false true = true then (↑(pos n) : ℕ) else 0)
have zero : Eq (α := ℕ) (↑(bif false then pos n else 0) : ℕ) (if false = true then (↑(pos n) : ℕ) else 0)
Tactic: cases g false true
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
n : PosNum
zero : Eq (α := ℕ) (↑(bif false then pos n else 0) : ℕ) (if false = true then (↑(pos n) : ℕ) else 0)
⊢ Eq (α := ℕ) (↑(bif g false true then pos n else 0) : ℕ) (if g false true = true then (↑(pos n) : ℕ) else 0)
have zero₁ : Eq (α := ℕ) (↑(bif true then pos n else 0) : ℕ) (if true = true then (↑(pos n) : ℕ) else 0)
Tactic: cases g false true
-- Lean 4 proof step from Mathlib.Data.Num.Lemmas (goal)
Goal:
f : Num → Num → Num
g : Bool → Bool → Bool
p : PosNum → PosNum → Num
gff : g false false = false
f00 : f 0 0 = 0
f0n : ∀ (n : PosNum), f 0 (pos n) = bif g false true then pos n else 0
fn0 : ∀ (n : PosNum), f (pos n) 0 = bif g true false then pos n else 0
fnn : ∀ (m n : PosNum), f (pos m) (pos n) = p m n
p11 : p 1 1 = bif g true true then 1 else 0
p1b : ∀ (b : Bool) (n : PosNum), p 1 (PosNum.bit b n) = bit (g true b) (bif g false true then pos n else 0)
pb1 : ∀ (a : Bool) (m : PosNum), p (PosNum.bit a m) 1 = bit (g a true) (bif g true false then pos m else 0)
pbb : ∀ (a b : Bool) (m n : PosNum), p (PosNum.bit a m) (PosNum.bit b n) = bit (g a b) (p m n)
m : PosNum
⊢ (↑(f (pos m) 0) : ℕ) = Nat.bitwise g (↑(pos m) : ℕ) 0
have pos : Eq (α := ℕ) (↑(bif g true false then pos m else 0) : ℕ) (if g true false = true then (↑(pos m) : ℕ) else 0)
Tactic: rw [fn0, Nat.bitwise_zero_right]