Properties of the binary representation of integers #
This tactic tries to turn an (in)equality about Nums to one about Nats by rewriting.
example (n : Num) (m : Num) : n ≤ n + m := by
transfer_rw
exact Nat.le_add_right _ _
Equations
- Num.transfer_rw = Lean.ParserDescr.node `Num.transfer_rw 1024 (Lean.ParserDescr.nonReservedSymbol "transfer_rw" false)
Instances For
This tactic tries to prove (in)equalities about Nums by transferring them to the Nat world and
then trying to call grind.
example (n : Num) (m : Num) : n ≤ n + m := by transfer
Equations
- Num.transfer = Lean.ParserDescr.node `Num.transfer 1024 (Lean.ParserDescr.nonReservedSymbol "transfer" false)
Instances For
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- Num.addMonoidWithOne = { natCast := Num.ofNat', toAddMonoid := Num.addMonoid, toOne := instOneNum, natCast_zero := Num.ofNat'_zero, natCast_succ := ⋯ }
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
This tactic tries to turn an (in)equality about PosNums to one about Nats by rewriting.
example (n : PosNum) (m : PosNum) : n ≤ n + m := by
transfer_rw
exact Nat.le_add_right _ _
Equations
- PosNum.transfer_rw = Lean.ParserDescr.node `PosNum.transfer_rw 1024 (Lean.ParserDescr.nonReservedSymbol "transfer_rw" false)
Instances For
This tactic tries to prove (in)equalities about PosNums by transferring them to the Nat world
and then trying to call grind.
example (n : PosNum) (m : PosNum) : n ≤ n + m := by transfer
Equations
- PosNum.transfer = Lean.ParserDescr.node `PosNum.transfer 1024 (Lean.ParserDescr.nonReservedSymbol "transfer" false)
Instances For
@[instance_reducible]
Equations
- PosNum.addCommSemigroup = { toAdd := PosNum.instAdd, add_assoc := PosNum.addCommSemigroup._proof_2, add_comm := PosNum.addCommSemigroup._proof_4 }
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- PosNum.distrib = { toMul := PosNum.instMul, toAdd := PosNum.instAdd, left_distrib := PosNum.distrib._proof_2, right_distrib := PosNum.distrib._proof_4 }
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[simp]
@[simp]
@[simp]
@[simp]
theorem PosNum.one_le_cast {α : Type u_1} [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] (n : PosNum) :
@[simp]
theorem PosNum.cast_pos {α : Type u_1} [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] (n : PosNum) :
@[simp]
@[simp]
theorem PosNum.cast_lt {α : Type u_1} [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] {m n : PosNum} :
@[simp]
theorem PosNum.cast_le {α : Type u_1} [Semiring α] [LinearOrder α] [IsStrictOrderedRing α] {m n : PosNum} :
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem Num.cast_lt {α : Type u_1} [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] {m n : Num} :
@[simp]
theorem Num.cast_le {α : Type u_1} [Semiring α] [LinearOrder α] [IsStrictOrderedRing α] {m n : Num} :
@[simp]
theorem Num.cast_inj {α : Type u_1} [Semiring α] [PartialOrder α] [IsStrictOrderedRing α] {m n : Num} :
theorem Num.castNum_eq_bitwise {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) :
@[instance_reducible]
Equations
- Int.snumCoe = { coe := Int.ofSnum }