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/Trace/Master.lean | blah4 | [24, 1] | [33, 25] | apply Nat.le_add_right | case h
a b x : ℕ
⊢ a ≤ a + b | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah5 | [35, 1] | [37, 30] | simp | a b x : ℕ
⊢ x ^ (a + b) - x ^ a ≤ (x + 0) ^ (a + b) - (x + 0) ^ a | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | cases a <;> cases b <;> cases y <;>
simp [Nat.pow_add] | a b y : ℕ
⊢ (0 + y) ^ a - 0 ^ a ≤ (0 + y) ^ (a + b) - 0 ^ (a + b) | case succ.succ.succ
n✝² n✝¹ n✝ : ℕ
⊢ 1 ≤ Nat.succ n✝ ^ Nat.succ n✝¹ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | exact le_trans (Nat.pow_le_pow_right (Nat.zero_lt_succ 0) (Nat.succ_le_succ (Nat.zero_le _))) (Nat.pow_le_pow_left (Nat.succ_le_succ (Nat.zero_le _)) _) | case succ.succ.succ
n✝² n✝¹ n✝ : ℕ
⊢ 1 ≤ Nat.succ n✝ ^ Nat.succ n✝¹ | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.le_sub_of_add_le | a b y x : ℕ
⊢ (x + 1 + y) ^ a - (x + 1) ^ a ≤ (x + 1 + y) ^ (a + b) - (x + 1) ^ (a + b) | case h
a b y x : ℕ
⊢ (x + 1 + y) ^ a - (x + 1) ^ a + (x + 1) ^ (a + b) ≤ (x + 1 + y) ^ (a + b) |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | rw [← Nat.sub_add_comm, add_comm (_ ^ _), Nat.sub_add_comm] | case h
a b y x : ℕ
⊢ (x + 1 + y) ^ a - (x + 1) ^ a + (x + 1) ^ (a + b) ≤ (x + 1 + y) ^ (a + b) | case h
a b y x : ℕ
⊢ (x + 1) ^ (a + b) - (x + 1) ^ a + (x + 1 + y) ^ a ≤ (x + 1 + y) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.add_le_of_le_sub _ blah5 | case h
a b y x : ℕ
⊢ (x + 1) ^ (a + b) - (x + 1) ^ a + (x + 1 + y) ^ a ≤ (x + 1 + y) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | a b y x : ℕ
⊢ (x + 1 + y) ^ a ≤ (x + 1 + y) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.pow_le_pow_right | a b y x : ℕ
⊢ (x + 1 + y) ^ a ≤ (x + 1 + y) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case hx
a b y x : ℕ
⊢ x + 1 + y > 0
case a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.lt_add_right _ (Nat.zero_lt_succ _) | case hx
a b y x : ℕ
⊢ x + 1 + y > 0
case a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.le_add_right | case a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.pow_le_pow_right | case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1) ^ (a + b)
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case h.hx
a b y x : ℕ
⊢ x + 1 > 0
case h.a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.zero_lt_succ _ | case h.hx
a b y x : ℕ
⊢ x + 1 > 0
case h.a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case h.a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.le_add_right | case h.a
a b y x : ℕ
⊢ a ≤ a + b
case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.pow_le_pow_left | case h
a b y x : ℕ
⊢ (x + 1) ^ a ≤ (x + 1 + y) ^ a | case h.h
a b y x : ℕ
⊢ x + 1 ≤ x + 1 + y |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah6 | [39, 1] | [55, 25] | apply Nat.le_add_right | case h.h
a b y x : ℕ
⊢ x + 1 ≤ x + 1 + y | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah7 | [57, 1] | [62, 14] | apply (Nat.exists_eq_add_of_le hab).elim | a b x y : ℕ
hab : a ≤ b
hxy : x ≤ y
⊢ y ^ a - x ^ a ≤ y ^ b - x ^ b | a b x y : ℕ
hab : a ≤ b
hxy : x ≤ y
⊢ ∀ (a_1 : ℕ), b = a + a_1 → y ^ a - x ^ a ≤ y ^ b - x ^ b |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah7 | [57, 1] | [62, 14] | apply (Nat.exists_eq_add_of_le hxy).elim | a b x y : ℕ
hab : a ≤ b
hxy : x ≤ y
⊢ ∀ (a_1 : ℕ), b = a + a_1 → y ^ a - x ^ a ≤ y ^ b - x ^ b | a b x y : ℕ
hab : a ≤ b
hxy : x ≤ y
⊢ ∀ (a_1 : ℕ), y = x + a_1 → ∀ (a_3 : ℕ), b = a + a_3 → y ^ a - x ^ a ≤ y ^ b - x ^ b |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah7 | [57, 1] | [62, 14] | intro _ hxy _ hab | a b x y : ℕ
hab : a ≤ b
hxy : x ≤ y
⊢ ∀ (a_1 : ℕ), y = x + a_1 → ∀ (a_3 : ℕ), b = a + a_3 → y ^ a - x ^ a ≤ y ^ b - x ^ b | a b x y : ℕ
hab✝ : a ≤ b
hxy✝ : x ≤ y
a✝¹ : ℕ
hxy : y = x + a✝¹
a✝ : ℕ
hab : b = a + a✝
⊢ y ^ a - x ^ a ≤ y ^ b - x ^ b |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah7 | [57, 1] | [62, 14] | rw [hxy, hab] | a b x y : ℕ
hab✝ : a ≤ b
hxy✝ : x ≤ y
a✝¹ : ℕ
hxy : y = x + a✝¹
a✝ : ℕ
hab : b = a + a✝
⊢ y ^ a - x ^ a ≤ y ^ b - x ^ b | a b x y : ℕ
hab✝ : a ≤ b
hxy✝ : x ≤ y
a✝¹ : ℕ
hxy : y = x + a✝¹
a✝ : ℕ
hab : b = a + a✝
⊢ (x + a✝¹) ^ a - x ^ a ≤ (x + a✝¹) ^ (a + a✝) - x ^ (a + a✝) |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | blah7 | [57, 1] | [62, 14] | exact blah6 | a b x y : ℕ
hab✝ : a ≤ b
hxy✝ : x ≤ y
a✝¹ : ℕ
hxy : y = x + a✝¹
a✝ : ℕ
hab : b = a + a✝
⊢ (x + a✝¹) ^ a - x ^ a ≤ (x + a✝¹) ^ (a + a✝) - x ^ (a + a✝) | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | induction n using Nat.case_strong_induction_on with
| hi n₀ ih =>
intro a hsz
apply le_trans (splitTimeCost _ _)
apply le_of_eq_of_le
apply Eq.trans
apply Nat.add_right_comm _ _ _
apply Nat.add_comm
apply add_le_add _
apply hsi
apply le_trans
apply Trace.CostedProgram.recurseTimeCostBound (x := x * n₀ + x)
intro arg harg
apply le_trans _ (add_le_add_right (mul_le_mul (le_refl _ ) _ (zero_le _) (zero_le _)) _)
use sz arg
specialize ih (sz arg) _
apply Nat.succ_le_succ_iff.mp
apply le_of_le_of_eq _ hsz
apply Nat.succ_le_of_lt harg
specialize ih _ rfl
simp only [p.costedMatches']
apply ih
apply Nat.succ_le_succ_iff.mp
apply le_of_le_of_eq _ hsz
apply Nat.succ_le_of_lt harg
simp only [p.costedMatches, hr, one_mul, Nat.mul_succ]
apply le_refl
| hz =>
intro a hsz
apply le_trans (splitTimeCost _ _)
apply le_of_eq_of_le
apply Eq.trans
apply Nat.add_right_comm _ _ _
apply Nat.add_comm
apply add_le_add _
apply hsi
apply le_of_eq_of_le _ (zero_le _)
apply Trace.CostedProgram.recurseTimeCost_leaf (costed_sound h) _ hsz | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n : ℕ
⊢ ∀ (a : α), sz a = n → timeCost' p h a ≤ x * n + x | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | intro a hsz | case hi
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
⊢ ∀ (a : α), sz a = Nat.succ n₀ → timeCost' p h a ≤ x * Nat.succ n₀ + x | case hi
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ timeCost' p h a ≤ x * Nat.succ n₀ + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_trans (splitTimeCost _ _) | case hi
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ timeCost' p h a ≤ x * Nat.succ n₀ + x | case hi
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a ≤ x * Nat.succ n₀ + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_of_eq_of_le | case hi
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a ≤ x * Nat.succ n₀ + x | case hi.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hi.b
case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.b ≤ x * Nat.succ n₀ + x
case hi.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Eq.trans | case hi.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hi.b
case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.b ≤ x * Nat.succ n₀ + x
case hi.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ | case hi.h₁.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hi.h₁.b
case hi.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.h₁.b = ?hi.b
case hi.h₁.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ
case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.b ≤ x * Nat.succ n₀ + x
case hi.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.add_right_comm _ _ _ | case hi.h₁.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hi.h₁.b
case hi.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.h₁.b = ?hi.b
case hi.h₁.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ
case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.b ≤ x * Nat.succ n₀ + x
case hi.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ | case hi.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ subroutineTimeCost h a + localTimeCost h a + recurseTimeCost h a = ?hi.b
case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.b ≤ x * Nat.succ n₀ + x
case hi.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.add_comm | case hi.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ subroutineTimeCost h a + localTimeCost h a + recurseTimeCost h a = ?hi.b
case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?hi.b ≤ x * Nat.succ n₀ + x
case hi.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ | case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a + (subroutineTimeCost h a + localTimeCost h a) ≤ x * Nat.succ n₀ + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply add_le_add _ | case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a + (subroutineTimeCost h a + localTimeCost h a) ≤ x * Nat.succ n₀ + x | case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ subroutineTimeCost h a + localTimeCost h a ≤ x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply hsi | case hi.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ subroutineTimeCost h a + localTimeCost h a ≤ x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_trans | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a ≤ x * Nat.succ n₀ | case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a ≤ ?b
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?b ≤ x * Nat.succ n₀
case b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Trace.CostedProgram.recurseTimeCostBound (x := x * n₀ + x) | case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ recurseTimeCost h a ≤ ?b
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ?b ≤ x * Nat.succ n₀
case b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ℕ | case a.hsz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ∀ (arg : α),
sz arg < sz a →
timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * n₀ + x
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | intro arg harg | case a.hsz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ ∀ (arg : α),
sz arg < sz a →
timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * n₀ + x
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | case a.hsz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * n₀ + x
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_trans _ (add_le_add_right (mul_le_mul (le_refl _ ) _ (zero_le _) (zero_le _)) _) | case a.hsz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * n₀ + x
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ ℕ
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * ?m.159899 + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ ?m.159899 ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | use sz arg | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ ℕ
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * ?m.159899 + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ ?m.159899 ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | specialize ih (sz arg) _ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.succ_le_succ_iff.mp | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ Nat.succ n₀
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_of_le_of_eq _ hsz | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ Nat.succ n₀
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ sz a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.succ_le_of_lt harg | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ sz a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | specialize ih _ rfl | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : ∀ (a : α), sz a = sz arg → timeCost' p h a ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : timeCost' p h arg ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | simp only [p.costedMatches'] | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : timeCost' p h arg ≤ x * sz arg + x
⊢ timeCost (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(_ :
haltsOn (Trace.TracedProgram.toProgram (Trace.CostedProgram.toTracedProgram (costed p)))
(Complexity.encode arg)) ≤
x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : timeCost' p h arg ≤ x * sz arg + x
⊢ timeCost p (_ : haltsOn p (Complexity.encode arg)) ≤ x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply ih | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
ih : timeCost' p h arg ≤ x * sz arg + x
⊢ timeCost p (_ : haltsOn p (Complexity.encode arg)) ≤ x * sz arg + x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.succ_le_succ_iff.mp | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ sz arg ≤ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ Nat.succ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_of_le_of_eq _ hsz | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ Nat.succ n₀
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ sz a
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.succ_le_of_lt harg | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
arg : α
harg : sz arg < sz a
⊢ Nat.succ (sz arg) ≤ sz a
case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | simp only [p.costedMatches, hr, one_mul, Nat.mul_succ] | case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ maxRecurse (Trace.CostedProgram.toProgram (costed p)) * (x * n₀ + x) ≤ x * Nat.succ n₀ | case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ x * n₀ + x ≤ x * n₀ + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_refl | case a
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
n₀ : ℕ
ih : ∀ m ≤ n₀, ∀ (a : α), sz a = m → timeCost' p h a ≤ x * m + x
a : α
hsz : sz a = Nat.succ n₀
⊢ x * n₀ + x ≤ x * n₀ + x | no goals |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | intro a hsz | case hz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
⊢ ∀ (a : α), sz a = 0 → timeCost' p h a ≤ x * 0 + x | case hz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ timeCost' p h a ≤ x * 0 + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_trans (splitTimeCost _ _) | case hz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ timeCost' p h a ≤ x * 0 + x | case hz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a ≤ x * 0 + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_of_eq_of_le | case hz
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a ≤ x * 0 + x | case hz.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hz.b
case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.b ≤ x * 0 + x
case hz.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Eq.trans | case hz.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hz.b
case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.b ≤ x * 0 + x
case hz.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ | case hz.h₁.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hz.h₁.b
case hz.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.h₁.b = ?hz.b
case hz.h₁.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ
case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.b ≤ x * 0 + x
case hz.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.add_right_comm _ _ _ | case hz.h₁.h₁
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ (subroutineTimeCost h + recurseTimeCost h + localTimeCost h) a = ?hz.h₁.b
case hz.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.h₁.b = ?hz.b
case hz.h₁.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ
case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.b ≤ x * 0 + x
case hz.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ | case hz.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ subroutineTimeCost h a + localTimeCost h a + recurseTimeCost h a = ?hz.b
case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.b ≤ x * 0 + x
case hz.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Nat.add_comm | case hz.h₁.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ subroutineTimeCost h a + localTimeCost h a + recurseTimeCost h a = ?hz.b
case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ?hz.b ≤ x * 0 + x
case hz.b
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ ℕ | case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a + (subroutineTimeCost h a + localTimeCost h a) ≤ x * 0 + x |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply add_le_add _ | case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a + (subroutineTimeCost h a + localTimeCost h a) ≤ x * 0 + x | case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ subroutineTimeCost h a + localTimeCost h a ≤ x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a ≤ x * 0 |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply hsi | case hz.h₂
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ subroutineTimeCost h a + localTimeCost h a ≤ x
TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a ≤ x * 0 | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a ≤ x * 0 |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply le_of_eq_of_le _ (zero_le _) | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a ≤ x * 0 | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a = 0 |
https://github.com/calcu16/lean_complexity.git | d267eb4f3952c654f130a119311692c1c1a7cd71 | HMem/Trace/Master.lean | HMem.Program.simpleLoopCost | [170, 1] | [213, 74] | apply Trace.CostedProgram.recurseTimeCost_leaf (costed_sound h) _ hsz | TracedProgram : Sort ?u.75510
α : Type u_1
inst✝² : Complexity.Coding α Memory
β : Type u_2
inst✝¹ : Complexity.Encoding β Memory
f : α → β
tp : TracedProgram
sz : α → ℕ
p : Program
inst✝ : Trace.HasCostedProgram p
h : sound p f sz
x : ℕ
hsi : subroutineTimeCost h + localTimeCost h ≤ fun x_1 => x
hr : maxRecurse p = 1
a : α
hsz : sz a = 0
⊢ recurseTimeCost h a = 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | mul_of_mul_base_exp | [34, 1] | [40, 11] | match c with
| 0 => simp only [exp]
| z+1 =>
simp only [exp,Nat.add]
rw [mul_of_mul_base_exp a b z]
ac_rfl | a b c : ℕ
⊢ exp (a * b) c = exp a c * exp b c | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | mul_of_mul_base_exp | [34, 1] | [40, 11] | simp only [exp] | a b c : ℕ
⊢ exp (a * b) 0 = exp a 0 * exp b 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | mul_of_mul_base_exp | [34, 1] | [40, 11] | simp only [exp,Nat.add] | a b c z : ℕ
⊢ exp (a * b) (z + 1) = exp a (z + 1) * exp b (z + 1) | a b c z : ℕ
⊢ exp (a * b) z * (a * b) = exp a z * a * (exp b z * b) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | mul_of_mul_base_exp | [34, 1] | [40, 11] | rw [mul_of_mul_base_exp a b z] | a b c z : ℕ
⊢ exp (a * b) z * (a * b) = exp a z * a * (exp b z * b) | a b c z : ℕ
⊢ exp a z * exp b z * (a * b) = exp a z * a * (exp b z * b) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | mul_of_mul_base_exp | [34, 1] | [40, 11] | ac_rfl | a b c z : ℕ
⊢ exp a z * exp b z * (a * b) = exp a z * a * (exp b z * b) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | zero_times | [117, 1] | [122, 21] | match n with
| 0 => simp
| n'+1 =>
simp [times]
exact zero_times | α : Type
n : ℕ
⊢ times 0 n = 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | zero_times | [117, 1] | [122, 21] | simp | α : Type
n : ℕ
⊢ times 0 0 = 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | zero_times | [117, 1] | [122, 21] | simp [times] | α : Type
n n' : ℕ
⊢ times 0 (n' + 1) = 0 | α : Type
n n' : ℕ
⊢ times 0 n' = 0 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | zero_times | [117, 1] | [122, 21] | exact zero_times | α : Type
n n' : ℕ
⊢ times 0 n' = 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | succ_times | [125, 1] | [132, 11] | match m with
| 0 =>
simp [times]
| m'+1 =>
simp [times]
rw [@succ_times n m']
ac_rfl | α : Type
n m : ℕ
⊢ times (n + 1) m = times n m + m | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | succ_times | [125, 1] | [132, 11] | simp [times] | α : Type
n m : ℕ
⊢ times (n + 1) 0 = times n 0 + 0 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | succ_times | [125, 1] | [132, 11] | simp [times] | α : Type
n m m' : ℕ
⊢ times (n + 1) (m' + 1) = times n (m' + 1) + (m' + 1) | α : Type
n m m' : ℕ
⊢ times (n + 1) m' + (n + 1) = times n m' + n + (m' + 1) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | succ_times | [125, 1] | [132, 11] | rw [@succ_times n m'] | α : Type
n m m' : ℕ
⊢ times (n + 1) m' + (n + 1) = times n m' + n + (m' + 1) | α : Type
n m m' : ℕ
⊢ times n m' + m' + (n + 1) = times n m' + n + (m' + 1) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | succ_times | [125, 1] | [132, 11] | ac_rfl | α : Type
n m m' : ℕ
⊢ times n m' + m' + (n + 1) = times n m' + n + (m' + 1) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | times_comm | [134, 1] | [142, 25] | match n,m with
| n, 0 =>
simp [times]
| n, m'+1 =>
simp [times]
rw [times_comm n m'] | α : Type
n m : ℕ
⊢ times n m = times m n | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | times_comm | [134, 1] | [142, 25] | simp [times] | α : Type
n✝ m n : ℕ
⊢ times n 0 = times 0 n | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | times_comm | [134, 1] | [142, 25] | simp [times] | α : Type
n✝ m n m' : ℕ
⊢ times n (m' + 1) = times (m' + 1) n | α : Type
n✝ m n m' : ℕ
⊢ times n m' + n = times m' n + n |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/Induction.lean | times_comm | [134, 1] | [142, 25] | rw [times_comm n m'] | α : Type
n✝ m n m' : ℕ
⊢ times n m' + n = times m' n + n | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.sorted_tail_of_sorted | [50, 1] | [54, 30] | match h with
| single => apply nil
| longer _ h'' => exact h'' | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
as : List α
h : Sorted r (a :: as)
⊢ Sorted r as | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.sorted_tail_of_sorted | [50, 1] | [54, 30] | apply nil | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
as : List α
h : Sorted r (a :: as)
⊢ Sorted r [] | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.sorted_tail_of_sorted | [50, 1] | [54, 30] | exact h'' | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
as : List α
h : Sorted r (a :: as)
a₂✝ : α
as✝ : List α
h✝ : r a a₂✝
h'' : Sorted r (a₂✝ :: as✝)
⊢ Sorted r (a₂✝ :: as✝) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.len_insert_eq_succ_len | [79, 1] | [85, 54] | simp [insert] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
⊢ List.length (insert r a []) = List.length [] + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.len_insert_eq_succ_len | [79, 1] | [85, 54] | simp [insert, h] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : r a a'
⊢ List.length (insert r a (a' :: as)) = List.length (a' :: as) + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.len_insert_eq_succ_len | [79, 1] | [85, 54] | simp [insert, h] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : ¬r a a'
⊢ List.length (insert r a (a' :: as)) = List.length (a' :: as) + 1 | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : ¬r a a'
⊢ List.length (insert r a as) = List.length as + 1 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.len_insert_eq_succ_len | [79, 1] | [85, 54] | apply len_insert_eq_succ_len | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : ¬r a a'
⊢ List.length (insert r a as) = List.length as + 1 | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.ordered_cons_insert_of_unordered | [134, 1] | [142, 55] | simp [insert] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
h : Sorted r [a']
⊢ r a' (insert r a [])[0] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
h : Sorted r [a']
⊢ r a' a |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.ordered_cons_insert_of_unordered | [134, 1] | [142, 55] | assumption | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
h : Sorted r [a']
⊢ r a' a | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.ordered_cons_insert_of_unordered | [134, 1] | [142, 55] | simpa [insert, h''] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
a'' : α
as' : List α
h : Sorted r (a' :: a'' :: as')
h'' : r a a''
⊢ r a' (insert r a (a'' :: as'))[0] | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.ordered_cons_insert_of_unordered | [134, 1] | [142, 55] | simp [insert, h''] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
a'' : α
as' : List α
h : Sorted r (a' :: a'' :: as')
h'' : ¬r a a''
⊢ r a' (insert r a (a'' :: as'))[0] | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
a'' : α
as' : List α
h : Sorted r (a' :: a'' :: as')
h'' : ¬r a a''
⊢ r a' a'' |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.ordered_cons_insert_of_unordered | [134, 1] | [142, 55] | apply ordered_of_sorted r h | α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a a' : α
as : List α
h' : r a' a
a'' : α
as' : List α
h : Sorted r (a' :: a'' :: as')
h'' : ¬r a a''
⊢ r a' a'' | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | simp [insert, h'] | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : r a a'
⊢ Sorted r (insert r a (a' :: as)) | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : r a a'
⊢ Sorted r (a :: a' :: as) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | apply longer h' h | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : r a a'
⊢ Sorted r (a :: a' :: as) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | simp [insert, h'] | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ Sorted r (insert r a (a' :: as)) | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ Sorted r (a' :: insert r a as) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | apply cons r | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ Sorted r (a' :: insert r a as) | case h₁
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ Sorted r (insert r a as)
case h₃
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ r a' (insert r a as)[0]
case h₂
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ List.length (insert r a as) > 0 |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | apply insert_sorted_of_sorted <| sorted_tail_of_sorted r a' as h | case h₁
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ Sorted r (insert r a as) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | apply ordered_cons_insert_of_unordered r h | case h₃
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ r a' (insert r a as)[0] | case h₃
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ r a' a |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | apply asym | case h₃
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ r a' a | case h₃.a
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ ¬r a a' |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.insert_sorted_of_sorted | [146, 1] | [159, 39] | assumption | case h₃.a
α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
a : α
l : List α
inst✝ : Asymmetric r
a' : α
as : List α
h : Sorted r (a' :: as)
h' : ¬r a a'
⊢ ¬r a a' | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.sorted_of_insertSort | [163, 1] | [169, 63] | dsimp [insertSort] | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
l : List α
inst✝ : Asymmetric r
a : α
as : List α
⊢ Sorted r (insertSort r (a :: as)) | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
l : List α
inst✝ : Asymmetric r
a : α
as : List α
⊢ Sorted r (insert r a (insertSort r as)) |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.sorted_of_insertSort | [163, 1] | [169, 63] | apply insert_sorted_of_sorted r <| sorted_of_insertSort as | α : Type
r : α → α → Prop
inst✝¹ : DecidableRel r
l : List α
inst✝ : Asymmetric r
a : α
as : List α
⊢ Sorted r (insert r a (insertSort r as)) | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | rw [List.length_nil] at h' | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i✝ j✝ : ℕ
x✝¹ : i✝ < j✝
h' : i✝ < List.length []
x✝ : j✝ < List.length []
⊢ False | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i✝ j✝ : ℕ
x✝¹ : i✝ < j✝
h' : i✝ < 0
x✝ : j✝ < List.length []
⊢ False |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | exact Nat.not_lt_zero _ h' | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h : Sorted r l
i✝ j✝ : ℕ
x✝¹ : i✝ < j✝
h' : i✝ < 0
x✝ : j✝ < List.length []
⊢ False | no goals |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | dsimp at hi hj | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h✝ : Sorted r l
i✝ j✝ : ℕ
a✝ : α
h : i✝ < j✝
hi : i✝ < List.length [a✝]
hj : j✝ < List.length [a✝]
⊢ r [a✝][i✝] [a✝][j✝] | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h✝ : Sorted r l
i✝ j✝ : ℕ
a✝ : α
h : i✝ < j✝
hi : i✝ < 1
hj : j✝ < 1
⊢ r [a✝][i✝] [a✝][j✝] |
https://github.com/UofSC-Spring-2023-SCHC-411-H01/notes.git | 72bc9ee3a0c93523fec747000cb89a6983f00afb | Notes4/IndPred2.lean | Notes.totally_ordered_of_sorted | [180, 1] | [216, 42] | apply False.elim | α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h✝ : Sorted r l
i✝ j✝ : ℕ
a✝ : α
h : i✝ < j✝
hi : i✝ < 1
hj : j✝ < 1
⊢ r [a✝][i✝] [a✝][j✝] | case h
α : Type
r : α → α → Prop
inst✝² : DecidableRel r
inst✝¹ : Trans r r r
inst✝ : Transitive r
l : List α
h✝ : Sorted r l
i✝ j✝ : ℕ
a✝ : α
h : i✝ < j✝
hi : i✝ < 1
hj : j✝ < 1
⊢ False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.