url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.encode_nat_def
[244, 1]
[255, 6]
rfl
case hi.h₂.right.false n✝ n : ℕ a✝ : encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2)) hn : n = 0 → false = true ⊢ encodeList (Nat.bits n) = encode n case hi.h₂.right.true n✝ n : ℕ a✝ : encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2)) hn : n = 0 → true = true ⊢ encodeList (Nat.bits n) = encode n
case hi.h₂.right.true n✝ n : ℕ a✝ : encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2)) hn : n = 0 → true = true ⊢ encodeList (Nat.bits n) = encode n
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.encode_nat_def
[244, 1]
[255, 6]
rfl
case hi.h₂.right.true n✝ n : ℕ a✝ : encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2)) hn : n = 0 → true = true ⊢ encodeList (Nat.bits n) = encode n
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
simp [decode_nat]
hd tl : Memory ⊢ decode ℕ (Memory.mk true hd tl) = Option.map (fun n => 2 * n + Bool.toNat (Memory.getv hd)) (decode ℕ tl)
hd tl : Memory ⊢ Option.map (Nat.ofBits ∘ fun b => Memory.getv hd :: b) (decode (List Bool) tl) = Option.map ((fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits) (decode (List Bool) tl)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
apply congrArg₂ Option.map _ rfl
hd tl : Memory ⊢ Option.map (Nat.ofBits ∘ fun b => Memory.getv hd :: b) (decode (List Bool) tl) = Option.map ((fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits) (decode (List Bool) tl)
hd tl : Memory ⊢ (Nat.ofBits ∘ fun b => Memory.getv hd :: b) = (fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
apply funext
hd tl : Memory ⊢ (Nat.ofBits ∘ fun b => Memory.getv hd :: b) = (fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits
case h hd tl : Memory ⊢ ∀ (x : List Bool), (Nat.ofBits ∘ fun b => Memory.getv hd :: b) x = ((fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits) x
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
intro xs
case h hd tl : Memory ⊢ ∀ (x : List Bool), (Nat.ofBits ∘ fun b => Memory.getv hd :: b) x = ((fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits) x
case h hd tl : Memory xs : List Bool ⊢ (Nat.ofBits ∘ fun b => Memory.getv hd :: b) xs = ((fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits) xs
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
simp [Nat.ofBits]
case h hd tl : Memory xs : List Bool ⊢ (Nat.ofBits ∘ fun b => Memory.getv hd :: b) xs = ((fun n => 2 * n + Bool.toNat (Memory.getv hd)) ∘ Nat.ofBits) xs
case h hd tl : Memory xs : List Bool ⊢ Nat.bit (Memory.getv hd) (Nat.ofBits xs) = 2 * Nat.ofBits xs + Bool.toNat (Memory.getv hd)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
match HMem.Memory.getv hd with | true => simp [← Nat.two_mul] | false => simp [← Nat.two_mul]
case h hd tl : Memory xs : List Bool ⊢ Nat.bit (Memory.getv hd) (Nat.ofBits xs) = 2 * Nat.ofBits xs + Bool.toNat (Memory.getv hd)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
simp [← Nat.two_mul]
hd tl : Memory xs : List Bool ⊢ Nat.bit true (Nat.ofBits xs) = 2 * Nat.ofBits xs + Bool.toNat true
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Encoding/Basic.lean
HMem.Encoding.decode_succ
[269, 9]
[277, 34]
simp [← Nat.two_mul]
hd tl : Memory xs : List Bool ⊢ Nat.bit false (Nat.ofBits xs) = 2 * Nat.ofBits xs + Bool.toNat false
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Memory/Canonical.lean
HMem.Memory.canonical_congr
[87, 1]
[109, 67]
apply absurd (h₁.symm.trans (canonical_nil (hv.symm.trans (canonical_getOrElse.symm.trans (congrArg (λ t ↦ Tree.getOrElse 1 t false) h₀))) (hl.symm.trans (canonical_left.trans (congrArg _ h₀))) (hr.symm.trans (canonical_right.trans (congrArg _ h₀))))) Tree.noConfusion
v₀ : Bool lhs₀ rhs₀ t₁ : Tree Bool hv : Tree.getOrElse 1 (Tree.node v₀ lhs₀ rhs₀) false = Tree.getOrElse 1 t₁ false hl : canonical (Tree.left (Tree.node v₀ lhs₀ rhs₀)) = canonical (Tree.left t₁) hr : canonical (Tree.right (Tree.node v₀ lhs₀ rhs₀)) = canonical (Tree.right t₁) h₀ : canonical (Tree.node v₀ lhs₀ rhs₀) = Tree.nil h₁ : canonical t₁ = Tree.node (Tree.getOrElse 1 t₁ false) (canonical (Tree.left t₁)) (canonical (Tree.right t₁)) ⊢ canonical (Tree.node v₀ lhs₀ rhs₀) = canonical t₁
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
Option.filter_eq_some'
[12, 9]
[14, 91]
simpa [Option.filter, And.comm (a := Eq b _)] using λ heq ↦ heq ▸ ⟨id, id⟩
α : Type u_1 f : α → Bool b✝ b : α ⊢ Option.filter f (some b) = some b✝ ↔ some b = some b✝ ∧ f b✝ = true
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
Option.forall_mem_filter
[16, 1]
[17, 58]
simp
α : Type u_1 f : α → Bool o : Option α p : α → Prop ⊢ (∀ y ∈ Option.filter f o, p y) ↔ ∀ x ∈ o, f x = true → p x
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
Option.forall_mem_bind
[22, 1]
[24, 65]
simpa using ⟨ λ h _ hx _ ↦ h _ _ hx, λ h _ _ hx ↦ h _ hx _ ⟩
α : Type u_1 β : Type u_2 f : α → Option β o : Option α p : β → Prop ⊢ (∀ y ∈ Option.bind o f, p y) ↔ ∀ x ∈ o, ∀ y ∈ f x, p y
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
HMem.Trace.TracedProgram.sound_subroutine_arg
[95, 1]
[97, 85]
simp only [hm, Complexity.decode_inv, Option.get_some]
α : Type u_2 inst✝¹ : Complexity.Coding α Memory β : Type u_3 inst✝ : Complexity.Encoding β Memory f : α → β γ : Type u_1 δ : Type enγ : Complexity.Coding γ Memory enδ : Complexity.Encoding δ Memory fs : γ → δ hc : Complexity.Computable Encoding.Model fs size : α → ℕ a : α dst src : Source next : TracedProgram m : Memory h : sound f size a (subroutine dst src fs next) m x✝ : γ hm : Memory.getms m src = Complexity.encode x✝ right✝ : sound f size a next (Memory.setms m dst (Complexity.encode (fs x✝))) ⊢ Memory.getms m src = Complexity.encode (Option.get (Complexity.decode γ (Memory.getms m src)) (_ : Option.isSome (Complexity.decode γ (Memory.getms m src)) = true))
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
HMem.Trace.TracedProgram.sound_subroutine_next
[98, 1]
[100, 94]
simpa only [hm, Complexity.decode_inv, Option.get_some] using h
α : Type u_2 inst✝¹ : Complexity.Coding α Memory β : Type u_3 inst✝ : Complexity.Encoding β Memory f : α → β γ : Type u_1 δ : Type enγ : Complexity.Coding γ Memory enδ : Complexity.Encoding δ Memory fs : γ → δ hc : Complexity.Computable Encoding.Model fs size : α → ℕ a : α dst src : Source next : TracedProgram m : Memory h✝ : sound f size a (subroutine dst src fs next) m x✝ : γ hm : Memory.getms m src = Complexity.encode x✝ h : sound f size a next (Memory.setms m dst (Complexity.encode (fs x✝))) ⊢ sound f size a next (Memory.setms m dst (Complexity.encode (fs (Option.get (Complexity.decode γ (Memory.getms m src)) (_ : Option.isSome (Complexity.decode γ (Memory.getms m src)) = true)))))
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
HMem.Trace.TracedProgram.sound_recurse_arg
[108, 1]
[110, 88]
simp only [hm, Complexity.decode_inv, Option.get_some]
α : Type u_2 inst✝¹ : Complexity.Coding α Memory β : Type u_3 inst✝ : Complexity.Encoding β Memory f : α → β γ : Type ?u.37426 δ : Type enγ : Complexity.Coding γ Memory enδ : Complexity.Encoding δ Memory fs : γ → δ hc : Complexity.Computable Encoding.Model fs size : α → ℕ a : α dst src : Source next : TracedProgram m : Memory h : sound f size a (recurse dst src next) m x✝ : α hm : Memory.getms m src = Complexity.encode x✝ left✝ : size x✝ < size a right✝ : sound f size a next (Memory.setms m dst (Complexity.encode (f x✝))) ⊢ Memory.getms m src = Complexity.encode (Option.get (Complexity.decode α (Memory.getms m src)) (_ : Option.isSome (Complexity.decode α (Memory.getms m src)) = true))
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
HMem.Trace.TracedProgram.sound_recurse_size
[111, 1]
[113, 99]
simpa only [hm, Complexity.decode_inv, Option.get_some] using hs
α : Type u_2 inst✝¹ : Complexity.Coding α Memory β : Type u_3 inst✝ : Complexity.Encoding β Memory f : α → β γ : Type ?u.39174 δ : Type enγ : Complexity.Coding γ Memory enδ : Complexity.Encoding δ Memory fs : γ → δ hc : Complexity.Computable Encoding.Model fs size : α → ℕ a : α dst src : Source next : TracedProgram m : Memory h : sound f size a (recurse dst src next) m x✝ : α hm : Memory.getms m src = Complexity.encode x✝ hs : size x✝ < size a right✝ : sound f size a next (Memory.setms m dst (Complexity.encode (f x✝))) ⊢ size (Option.get (Complexity.decode α (Memory.getms m src)) (_ : Option.isSome (Complexity.decode α (Memory.getms m src)) = true)) < size a
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
HMem/Trace/Sound.lean
HMem.Trace.TracedProgram.sound_recurse_next
[114, 1]
[116, 97]
simpa only [hm, Complexity.decode_inv, Option.get_some] using h
α : Type u_2 inst✝¹ : Complexity.Coding α Memory β : Type u_3 inst✝ : Complexity.Encoding β Memory f : α → β γ : Type ?u.40501 δ : Type enγ : Complexity.Coding γ Memory enδ : Complexity.Encoding δ Memory fs : γ → δ hc : Complexity.Computable Encoding.Model fs size : α → ℕ a : α dst src : Source next : TracedProgram m : Memory h✝ : sound f size a (recurse dst src next) m x✝ : α hm : Memory.getms m src = Complexity.encode x✝ left✝ : size x✝ < size a h : sound f size a next (Memory.setms m dst (Complexity.encode (f x✝))) ⊢ sound f size a next (Memory.setms m dst (Complexity.encode (f (Option.get (Complexity.decode α (Memory.getms m src)) (_ : Option.isSome (Complexity.decode α (Memory.getms m src)) = true)))))
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Complexity/Cost.lean
Complexity.CostFunction.flatMap_none
[155, 1]
[156, 45]
simp[flatMap, h]
α : Type u_3 β : Type u_2 θ : Type u_1 inst✝ : Zero θ f : α → Option β a : α h : f a = none g : CostFunction β θ ⊢ flatMap f g a = 0
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Complexity/Cost.lean
Complexity.CostFunction.flatMap_some
[158, 1]
[159, 47]
simp[flatMap, h]
α : Type u_3 β : Type u_2 θ : Type u_1 inst✝ : Zero θ f : α → Option β a : α b : β h : f a = some b g : CostFunction β θ ⊢ flatMap f g a = g b
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
List.cons_append_inj
[55, 9]
[56, 58]
simp [-List.cons_append, (List.cons_append _ _ _).symm]
α : Type u_1 a : α x y z : List α ⊢ a :: (y ++ x) = z ++ x ↔ a :: y = z
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
List.cons₂_append_inj
[58, 9]
[59, 58]
simp [-List.cons_append, (List.cons_append _ _ _).symm]
α : Type u_1 a b : α x y z : List α ⊢ a :: b :: (y ++ x) = z ++ x ↔ a :: b :: y = z
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.bit_div_2
[81, 1]
[83, 48]
set_option linter.deprecated false in cases b <;> dsimp [bit, bit0, bit1] <;> omega
b : Bool n : ℕ ⊢ bit b n / 2 = n
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.bit_div_2
[81, 1]
[83, 48]
cases b <;> dsimp [bit, bit0, bit1] <;> omega
b : Bool n : ℕ ⊢ bit b n / 2 = n
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.pred_lt_iff
[110, 9]
[110, 74]
cases n <;> simp
n : ℕ ⊢ n - 1 < n ↔ n ≠ 0
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.size_div2
[113, 9]
[120, 32]
induction n using Nat.binaryRec' with | z => rfl | _ _ _ h => rw [bit_div_2, size_bit] apply Eq.symm apply Nat.pred_succ apply bit_ne_zero_iff.mpr h
n : ℕ ⊢ size (n / 2) = size n - 1
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.size_div2
[113, 9]
[120, 32]
rfl
case z ⊢ size (0 / 2) = size 0 - 1
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.size_div2
[113, 9]
[120, 32]
rw [bit_div_2, size_bit]
case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ size (bit b✝ n✝ / 2) = size (bit b✝ n✝) - 1
case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ size n✝ = succ (size n✝) - 1 case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ bit b✝ n✝ ≠ 0
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.size_div2
[113, 9]
[120, 32]
apply Eq.symm
case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ size n✝ = succ (size n✝) - 1 case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ bit b✝ n✝ ≠ 0
case f.h b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ succ (size n✝) - 1 = size n✝ case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ bit b✝ n✝ ≠ 0
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.size_div2
[113, 9]
[120, 32]
apply Nat.pred_succ
case f.h b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ succ (size n✝) - 1 = size n✝ case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ bit b✝ n✝ ≠ 0
case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ bit b✝ n✝ ≠ 0
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.size_div2
[113, 9]
[120, 32]
apply bit_ne_zero_iff.mpr h
case f b✝ : Bool n✝ : ℕ h : n✝ = 0 → b✝ = true a✝ : size (n✝ / 2) = size n✝ - 1 ⊢ bit b✝ n✝ ≠ 0
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
match b with | 0 => simp | b + 1 => match c with | 0 => simp[Nat.div_add_mod] | c + 1 => apply Eq.trans apply congrArg₂ _ (Nat.div_add_mod a (b + 1)).symm rfl apply Eq.trans apply Nat.add_mod apply Eq.trans exact congrArg₂ _ (congrArg₂ _ (Nat.mul_mod_mul_left _ _ _) (Nat.mod_eq_of_lt (lt_of_lt_of_le (Nat.mod_lt _ (Nat.zero_lt_succ _)) (Nat.le_mul_of_pos_right (Nat.zero_lt_succ _))))) rfl apply Nat.mod_eq_of_lt apply Nat.lt_of_succ_le apply le_trans apply Nat.succ_le_succ apply add_le_add apply Nat.mul_le_mul_left apply Nat.le_of_lt_succ (Nat.mod_lt _ (Nat.zero_lt_succ _)) apply Nat.le_of_lt_succ (Nat.mod_lt _ (Nat.zero_lt_succ _)) simp [Nat.succ_eq_add_one, left_distrib, right_distrib, ← add_assoc]
a b c : ℕ ⊢ a % (b * c) = b * (a / b % c) + a % b
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
simp
a b c : ℕ ⊢ a % (0 * c) = 0 * (a / 0 % c) + a % 0
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
match c with | 0 => simp[Nat.div_add_mod] | c + 1 => apply Eq.trans apply congrArg₂ _ (Nat.div_add_mod a (b + 1)).symm rfl apply Eq.trans apply Nat.add_mod apply Eq.trans exact congrArg₂ _ (congrArg₂ _ (Nat.mul_mod_mul_left _ _ _) (Nat.mod_eq_of_lt (lt_of_lt_of_le (Nat.mod_lt _ (Nat.zero_lt_succ _)) (Nat.le_mul_of_pos_right (Nat.zero_lt_succ _))))) rfl apply Nat.mod_eq_of_lt apply Nat.lt_of_succ_le apply le_trans apply Nat.succ_le_succ apply add_le_add apply Nat.mul_le_mul_left apply Nat.le_of_lt_succ (Nat.mod_lt _ (Nat.zero_lt_succ _)) apply Nat.le_of_lt_succ (Nat.mod_lt _ (Nat.zero_lt_succ _)) simp [Nat.succ_eq_add_one, left_distrib, right_distrib, ← add_assoc]
a b✝ c b : ℕ ⊢ a % ((b + 1) * c) = (b + 1) * (a / (b + 1) % c) + a % (b + 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
simp[Nat.div_add_mod]
a b✝ c b : ℕ ⊢ a % ((b + 1) * 0) = (b + 1) * (a / (b + 1) % 0) + a % (b + 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Eq.trans
a b✝ c✝ b c : ℕ ⊢ a % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
case h₁ a b✝ c✝ b c : ℕ ⊢ a % ((b + 1) * (c + 1)) = ?b case h₂ a b✝ c✝ b c : ℕ ⊢ ?b = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) case b a b✝ c✝ b c : ℕ ⊢ ℕ
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply congrArg₂ _ (Nat.div_add_mod a (b + 1)).symm rfl
case h₁ a b✝ c✝ b c : ℕ ⊢ a % ((b + 1) * (c + 1)) = ?b case h₂ a b✝ c✝ b c : ℕ ⊢ ?b = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) case b a b✝ c✝ b c : ℕ ⊢ ℕ
case h₂ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) + a % (b + 1)) % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Eq.trans
case h₂ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) + a % (b + 1)) % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
case h₂.h₁ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) + a % (b + 1)) % ((b + 1) * (c + 1)) = ?h₂.b case h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ?h₂.b = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) case h₂.b a b✝ c✝ b c : ℕ ⊢ ℕ
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.add_mod
case h₂.h₁ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) + a % (b + 1)) % ((b + 1) * (c + 1)) = ?h₂.b case h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ?h₂.b = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) case h₂.b a b✝ c✝ b c : ℕ ⊢ ℕ
case h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) % ((b + 1) * (c + 1)) + a % (b + 1) % ((b + 1) * (c + 1))) % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Eq.trans
case h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) % ((b + 1) * (c + 1)) + a % (b + 1) % ((b + 1) * (c + 1))) % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
case h₂.h₂.h₁ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) % ((b + 1) * (c + 1)) + a % (b + 1) % ((b + 1) * (c + 1))) % ((b + 1) * (c + 1)) = ?h₂.h₂.b case h₂.h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ?h₂.h₂.b = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) case h₂.h₂.b a b✝ c✝ b c : ℕ ⊢ ℕ
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
exact congrArg₂ _ (congrArg₂ _ (Nat.mul_mod_mul_left _ _ _) (Nat.mod_eq_of_lt (lt_of_lt_of_le (Nat.mod_lt _ (Nat.zero_lt_succ _)) (Nat.le_mul_of_pos_right (Nat.zero_lt_succ _))))) rfl
case h₂.h₂.h₁ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1)) % ((b + 1) * (c + 1)) + a % (b + 1) % ((b + 1) * (c + 1))) % ((b + 1) * (c + 1)) = ?h₂.h₂.b case h₂.h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ?h₂.h₂.b = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) case h₂.h₂.b a b✝ c✝ b c : ℕ ⊢ ℕ
case h₂.h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)) % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.mod_eq_of_lt
case h₂.h₂.h₂ a b✝ c✝ b c : ℕ ⊢ ((b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)) % ((b + 1) * (c + 1)) = (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)
case h₂.h₂.h₂.h a b✝ c✝ b c : ℕ ⊢ (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) < (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.lt_of_succ_le
case h₂.h₂.h₂.h a b✝ c✝ b c : ℕ ⊢ (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) < (b + 1) * (c + 1)
case h₂.h₂.h₂.h.h a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)) ≤ (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply le_trans
case h₂.h₂.h₂.h.h a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)) ≤ (b + 1) * (c + 1)
case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)) ≤ ?h₂.h₂.h₂.h.h.b case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ ?h₂.h₂.h₂.h.h.b ≤ (b + 1) * (c + 1) case h₂.h₂.h₂.h.h.b a b✝ c✝ b c : ℕ ⊢ ℕ
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.succ_le_succ
case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1)) ≤ ?h₂.h₂.h₂.h.h.b case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ ?h₂.h₂.h₂.h.h.b ≤ (b + 1) * (c + 1) case h₂.h₂.h₂.h.h.b a b✝ c✝ b c : ℕ ⊢ ℕ
case h₂.h₂.h₂.h.h.a.a a b✝ c✝ b c : ℕ ⊢ (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.m case h₂.h₂.h₂.h.h.a.m a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ?h₂.h₂.h₂.h.h.a.m ≤ (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply add_le_add
case h₂.h₂.h₂.h.h.a.a a b✝ c✝ b c : ℕ ⊢ (b + 1) * (a / (b + 1) % (c + 1)) + a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.m case h₂.h₂.h₂.h.h.a.m a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ?h₂.h₂.h₂.h.h.a.m ≤ (b + 1) * (c + 1)
case h₂.h₂.h₂.h.h.a.a.h₁ a b✝ c✝ b c : ℕ ⊢ (b + 1) * (a / (b + 1) % (c + 1)) ≤ ?h₂.h₂.h₂.h.h.a.a.b case h₂.h₂.h₂.h.h.a.a.h₂ a b✝ c✝ b c : ℕ ⊢ a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.d case h₂.h₂.h₂.h.h.a.a.b a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a.a.d a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ (?h₂.h₂.h₂.h.h.a.a.b + ?h₂.h₂.h₂.h.h.a.a.d) ≤ (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.mul_le_mul_left
case h₂.h₂.h₂.h.h.a.a.h₁ a b✝ c✝ b c : ℕ ⊢ (b + 1) * (a / (b + 1) % (c + 1)) ≤ ?h₂.h₂.h₂.h.h.a.a.b case h₂.h₂.h₂.h.h.a.a.h₂ a b✝ c✝ b c : ℕ ⊢ a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.d case h₂.h₂.h₂.h.h.a.a.b a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a.a.d a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ (?h₂.h₂.h₂.h.h.a.a.b + ?h₂.h₂.h₂.h.h.a.a.d) ≤ (b + 1) * (c + 1)
case h₂.h₂.h₂.h.h.a.a.h₁.h a b✝ c✝ b c : ℕ ⊢ a / (b + 1) % (c + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.h₁.m case h₂.h₂.h₂.h.h.a.a.h₁.m a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a.a.h₂ a b✝ c✝ b c : ℕ ⊢ a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.d case h₂.h₂.h₂.h.h.a.a.d a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * ?h₂.h₂.h₂.h.h.a.a.h₁.m + ?h₂.h₂.h₂.h.h.a.a.d) ≤ (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.le_of_lt_succ (Nat.mod_lt _ (Nat.zero_lt_succ _))
case h₂.h₂.h₂.h.h.a.a.h₁.h a b✝ c✝ b c : ℕ ⊢ a / (b + 1) % (c + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.h₁.m case h₂.h₂.h₂.h.h.a.a.h₁.m a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a.a.h₂ a b✝ c✝ b c : ℕ ⊢ a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.d case h₂.h₂.h₂.h.h.a.a.d a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * ?h₂.h₂.h₂.h.h.a.a.h₁.m + ?h₂.h₂.h₂.h.h.a.a.d) ≤ (b + 1) * (c + 1)
case h₂.h₂.h₂.h.h.a.a.h₂ a b✝ c✝ b c : ℕ ⊢ a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.d case h₂.h₂.h₂.h.h.a.a.d a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * c + ?h₂.h₂.h₂.h.h.a.a.d) ≤ (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
apply Nat.le_of_lt_succ (Nat.mod_lt _ (Nat.zero_lt_succ _))
case h₂.h₂.h₂.h.h.a.a.h₂ a b✝ c✝ b c : ℕ ⊢ a % (b + 1) ≤ ?h₂.h₂.h₂.h.h.a.a.d case h₂.h₂.h₂.h.h.a.a.d a b✝ c✝ b c : ℕ ⊢ ℕ case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * c + ?h₂.h₂.h₂.h.h.a.a.d) ≤ (b + 1) * (c + 1)
case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * c + b) ≤ (b + 1) * (c + 1)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.mod_mul
[128, 1]
[149, 75]
simp [Nat.succ_eq_add_one, left_distrib, right_distrib, ← add_assoc]
case h₂.h₂.h₂.h.h.a a b✝ c✝ b c : ℕ ⊢ succ ((b + 1) * c + b) ≤ (b + 1) * (c + 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑0 = 1)) (decide (↑0 = 1)) (decide (↑0 = 1)) = decide ((↑0 + ↑0 + ↑0) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑0 = 1)) (decide (↑0 = 1)) (decide (↑1 = 1)) = decide ((↑0 + ↑0 + ↑1) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑0 = 1)) (decide (↑1 = 1)) (decide (↑0 = 1)) = decide ((↑0 + ↑1 + ↑0) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑0 = 1)) (decide (↑1 = 1)) (decide (↑1 = 1)) = decide ((↑0 + ↑1 + ↑1) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑1 = 1)) (decide (↑0 = 1)) (decide (↑0 = 1)) = decide ((↑1 + ↑0 + ↑0) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑1 = 1)) (decide (↑0 = 1)) (decide (↑1 = 1)) = decide ((↑1 + ↑0 + ↑1) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑1 = 1)) (decide (↑1 = 1)) (decide (↑0 = 1)) = decide ((↑1 + ↑1 + ↑0) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.majoritySelect_fin
[159, 9]
[167, 23]
decide
⊢ majoritySelect (decide (↑1 = 1)) (decide (↑1 = 1)) (decide (↑1 = 1)) = decide ((↑1 + ↑1 + ↑1) / 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑0 = 1)) (decide (↑0 = 1)) (decide (↑0 = 1)) = decide ((↑0 + ↑0 + ↑0) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑0 = 1)) (decide (↑0 = 1)) (decide (↑1 = 1)) = decide ((↑0 + ↑0 + ↑1) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑0 = 1)) (decide (↑1 = 1)) (decide (↑0 = 1)) = decide ((↑0 + ↑1 + ↑0) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑0 = 1)) (decide (↑1 = 1)) (decide (↑1 = 1)) = decide ((↑0 + ↑1 + ↑1) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑1 = 1)) (decide (↑0 = 1)) (decide (↑0 = 1)) = decide ((↑1 + ↑0 + ↑0) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑1 = 1)) (decide (↑0 = 1)) (decide (↑1 = 1)) = decide ((↑1 + ↑0 + ↑1) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑1 = 1)) (decide (↑1 = 1)) (decide (↑0 = 1)) = decide ((↑1 + ↑1 + ↑0) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Bool.xor₃_fin
[169, 9]
[177, 23]
decide
⊢ xor₃ (decide (↑1 = 1)) (decide (↑1 = 1)) (decide (↑1 = 1)) = decide ((↑1 + ↑1 + ↑1) % 2 = 1)
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.not_mod2_eq_zero
[180, 9]
[183, 65]
cases n using binaryRec with | z => simp | f b _ _ => cases b <;> simp [← Nat.two_mul, Nat.mul_add_mod]
n : ℕ ⊢ ¬n % 2 = 0 ↔ n % 2 = 1
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.not_mod2_eq_zero
[180, 9]
[183, 65]
simp
case z ⊢ ¬0 % 2 = 0 ↔ 0 % 2 = 1
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.not_mod2_eq_zero
[180, 9]
[183, 65]
cases b <;> simp [← Nat.two_mul, Nat.mul_add_mod]
case f b : Bool n✝ : ℕ a✝ : bit b n✝ = n✝ → (¬bit b n✝ % 2 = 0 ↔ bit b n✝ % 2 = 1) ⊢ ¬bit b n✝ % 2 = 0 ↔ bit b n✝ % 2 = 1
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply le_antisymm
b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n) = log b n + 1
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n) ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply le_of_eq_of_le
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n) ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n) = ?a.b✝ case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ?a.b✝ ≤ log b n + 1 case a.b b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ℕ case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply Nat.log_of_one_lt_of_le hb
case a.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n) = ?a.b✝ case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ?a.b✝ ≤ log b n + 1 case a.b b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ℕ case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ≤ b * n case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply le_of_eq_of_le
case a.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ≤ b * n case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₁.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b = ?a.h₁.b✝ case a.h₁.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ?a.h₁.b✝ ≤ b * n case a.h₁.b b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ℕ case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply (mul_one _).symm
case a.h₁.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b = ?a.h₁.b✝ case a.h₁.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ?a.h₁.b✝ ≤ b * n case a.h₁.b b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ ℕ case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₁.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * 1 ≤ b * n case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply mul_le_mul (le_refl _) hn (zero_le _) (zero_le _)
case a.h₁.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * 1 ≤ b * n case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply Nat.succ_le_succ
case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) + 1 ≤ log b n + 1 case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₂.a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) ≤ log b n case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply Nat.log_mono_right
case a.h₂.a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b (b * n / b) ≤ log b n case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₂.a.h b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * n / b ≤ n case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply le_of_eq
case a.h₂.a.h b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * n / b ≤ n case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a.h₂.a.h.a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * n / b = n case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
rw [Nat.mul_div_right _ (lt_trans zero_lt_one hb)]
case a.h₂.a.h.a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * n / b = n case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply Nat.le_log_of_pow_le hb
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ log b n + 1 ≤ log b (b * n)
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ^ (log b n + 1) ≤ b * n
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
rw [Nat.pow_succ, mul_comm]
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ^ (log b n + 1) ≤ b * n
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * b ^ log b n ≤ b * n
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply mul_le_mul
case a b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b * b ^ log b n ≤ b * n
case a.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ≤ b case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ^ log b n ≤ n case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply le_refl
case a.h₁ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ≤ b case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ^ log b n ≤ n case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ^ log b n ≤ n case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply Nat.pow_log_le_self
case a.h₂ b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ b ^ log b n ≤ n case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
case a.h₂.hx b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ n ≠ 0 case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply ne_of_lt' (Nat.lt_of_succ_le hn)
case a.h₂.hx b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ n ≠ 0 case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply zero_le
case a.c0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b ^ log b n case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul
[186, 1]
[204, 16]
apply zero_le
case a.b0 b n : ℕ hb : 1 < b hn : 1 ≤ n ⊢ 0 ≤ b
no goals
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply le_antisymm
b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b (b * n + c) = log b n + 1
case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b (b * n + c) ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply le_of_eq_of_le
case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b (b * n + c) ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b (b * n + c) = ?a.b✝ case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ?a.b✝ ≤ log b n + 1 case a.b b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ℕ case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply Nat.log_of_one_lt_of_le hb
case a.h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b (b * n + c) = ?a.b✝ case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ?a.b✝ ≤ log b n + 1 case a.b b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ℕ case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b ≤ b * n + c case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply add_le_add _ (zero_le _)
case a.h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b ≤ b * n + c case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b ≤ b * n case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply le_of_eq_of_le
b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b ≤ b * n case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b = ?b case h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ?b ≤ b * n case b b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ℕ case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply (mul_one _).symm
case h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b = ?b case h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ?b ≤ b * n case b b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ℕ case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b * 1 ≤ b * n case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply mul_le_mul (le_refl _) hn (zero_le _) (zero_le _)
case h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ b * 1 ≤ b * n case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply Nat.succ_le_succ
case a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) + 1 ≤ log b n + 1 case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₂.a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) ≤ log b n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply Nat.log_mono_right
case a.h₂.a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b ((b * n + c) / b) ≤ log b n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₂.a.h b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ (b * n + c) / b ≤ n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply le_of_eq
case a.h₂.a.h b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ (b * n + c) / b ≤ n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₂.a.h.a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ (b * n + c) / b = n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply Eq.trans
case a.h₂.a.h.a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ (b * n + c) / b = n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₂.a.h.a.h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ (b * n + c) / b = ?a.h₂.a.h.a.b✝ case a.h₂.a.h.a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ?a.h₂.a.h.a.b✝ = n case a.h₂.a.h.a.b b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ℕ case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
https://github.com/calcu16/lean_complexity.git
d267eb4f3952c654f130a119311692c1c1a7cd71
Lib.lean
Nat.log_mul_add
[206, 1]
[223, 21]
apply Nat.mul_add_div (lt_trans zero_lt_one hb)
case a.h₂.a.h.a.h₁ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ (b * n + c) / b = ?a.h₂.a.h.a.b✝ case a.h₂.a.h.a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ?a.h₂.a.h.a.b✝ = n case a.h₂.a.h.a.b b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ ℕ case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)
case a.h₂.a.h.a.h₂ b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ n + c / b = n case a b n c : ℕ hb : 1 < b hn : 1 ≤ n hc : c < b ⊢ log b n + 1 ≤ log b (b * n + c)