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/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
omega
f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0 : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ d.size + ...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
have ge : d.size + 4 ≤ k := by omega
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0 : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ ...
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0 : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
have e0 : o + (1 + (k - (d.size + 4)) / 4) = o + (k - d.size) / 4 := by omega
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0 : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ ...
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0✝ : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
have e1 : k - d.size = k - (d.size + 4) + 4 := by omega
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0✝ : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠...
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0✝ : k ≠ d.size e1✝ : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
simp only [not_lt.mpr ge, ↓reduceIte, Nat.succ_eq_add_one, e0, e1, lt0, Nat.cast_add, Fin.natCast_self, add_zero]
case neg f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0✝ : k ≠ d.size e1✝ : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
omega
f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0 : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ d.size + ...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
omega
f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0 : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ d.size + ...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
omega
f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 e0✝ : k ≠ d.size e1 : k ≠ d.size + 1 e2 : k ≠ d.size + 2 e3 : k ≠ d.size +...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
simp only [ByteArray.size_push]
case succ.lt f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 ⊢ k < ((((d.push (f o).r).push (f o).g).push (f o).b).push (f...
case succ.lt f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 ⊢ k < d.size + 1 + 1 + 1 + 1 + n * 4
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_push_colors
[83, 1]
[115, 12]
omega
case succ.lt f : ℕ → Color UInt8 k n : ℕ h : ∀ (o : ℕ) (d : ByteArray), k < d.size + n * 4 → (push_colors f n o d).get! k = if k < d.size then d.get! k else (f (o + (k - d.size) / 4))[↑(k - d.size)] o : ℕ d : ByteArray lt : k < d.size + n * 4 + 4 ⊢ k < d.size + 1 + 1 + 1 + 1 + n * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_push_colors
[117, 1]
[123, 71]
simp only [getElem_fin, ByteArray.getElemNat_eq_get!, dite_eq_ite]
f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ (push_colors f n o d)[k] = if h : ↑k < d.size then d[k] else (f (o + (↑k - d.size) / 4))[↑(↑k - d.size)]
f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ (push_colors f n o d).get! ↑k = if ↑k < d.size then d.get! ↑k else (f (o + (↑k - d.size) / 4))[↑(↑k - d.size)]
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_push_colors
[117, 1]
[123, 71]
apply get!_push_colors
f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ (push_colors f n o d).get! ↑k = if ↑k < d.size then d.get! ↑k else (f (o + (↑k - d.size) / 4))[↑(↑k - d.size)]
case lt f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ ↑k < d.size + n * 4
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_push_colors
[117, 1]
[123, 71]
convert k.prop
case lt f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ ↑k < d.size + n * 4
case h.e'_4 f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ d.size + n * 4 = (push_colors f n o d).size
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_push_colors
[117, 1]
[123, 71]
simp only [size_push_colors]
case h.e'_4 f : ℕ → Color UInt8 n o : ℕ d : ByteArray k : Fin (push_colors f n o d).size ⊢ d.size + n * 4 = (push_colors f n o d).size
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.n0_lt_n
[130, 1]
[131, 37]
simp only [le_max_iff] at h
n chunk : ℕ h : ¬n ≤ max 1 chunk ⊢ n / 2 < n
n chunk : ℕ h : ¬(n ≤ 1 ∨ n ≤ chunk) ⊢ n / 2 < n
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.n0_lt_n
[130, 1]
[131, 37]
omega
n chunk : ℕ h : ¬(n ≤ 1 ∨ n ≤ chunk) ⊢ n / 2 < n
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.n1_lt_n
[132, 1]
[133, 37]
simp only [le_max_iff] at h
n chunk : ℕ h : ¬n ≤ max 1 chunk ⊢ n - n / 2 < n
n chunk : ℕ h : ¬(n ≤ 1 ∨ n ≤ chunk) ⊢ n - n / 2 < n
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.n1_lt_n
[132, 1]
[133, 37]
omega
n chunk : ℕ h : ¬(n ≤ 1 ∨ n ≤ chunk) ⊢ n - n / 2 < n
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors'
[152, 1]
[160, 10]
induction' n using Nat.strong_induction_on with n i generalizing o
f : ℕ → Color UInt8 n o chunk : ℕ ⊢ (parallel_colors' f n o chunk).size = n * 4
case h f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ ⊢ (parallel_colors' f n o chunk).size = n * 4
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors'
[152, 1]
[160, 10]
rw [parallel_colors']
case h f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ ⊢ (parallel_colors' f n o chunk).size = n * 4
case h f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun x => parallel_colors' f n0 o chunk; let t1 := Task.spawn fun x ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors'
[152, 1]
[160, 10]
by_cases h : n ≤ max 1 chunk
case h f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun x => parallel_colors' f n0 o chunk; let t1 := Task.spawn fun x ...
case pos f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ h : n ≤ max 1 chunk ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun x => parallel_colors' f n0 o chunk; let t...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors'
[152, 1]
[160, 10]
simp only [h, if_true, size_push_colors, ByteArray.size_mkEmpty, zero_add]
case pos f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ h : n ≤ max 1 chunk ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun x => parallel_colors' f n0 o chunk; let t...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors'
[152, 1]
[160, 10]
simp only [h, if_false, Task.spawn, ByteArray.size_append, i _ (n0_lt_n h), i _ (n1_lt_n h)]
case neg f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ h : ¬n ≤ max 1 chunk ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun x => parallel_colors' f n0 o chunk; let ...
case neg f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ h : ¬n ≤ max 1 chunk ⊢ n / 2 * 4 + (n - n / 2) * 4 = n * 4
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors'
[152, 1]
[160, 10]
omega
case neg f : ℕ → Color UInt8 chunk n : ℕ i : ∀ m < n, ∀ (o : ℕ), (parallel_colors' f m o chunk).size = m * 4 o : ℕ h : ¬n ≤ max 1 chunk ⊢ n / 2 * 4 + (n - n / 2) * 4 = n * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
have four : ((4 : ℕ) : Fin 4) = 0 := by decide
f : ℕ → Color UInt8 n o chunk k : ℕ lt : k < n * 4 ⊢ (parallel_colors' f n o chunk).get! k = (f (o + k / 4))[↑k]
f : ℕ → Color UInt8 n o chunk k : ℕ lt : k < n * 4 four : ↑4 = 0 ⊢ (parallel_colors' f n o chunk).get! k = (f (o + k / 4))[↑k]
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
induction' n using Nat.strong_induction_on with n i generalizing o k
f : ℕ → Color UInt8 n o chunk k : ℕ lt : k < n * 4 four : ↑4 = 0 ⊢ (parallel_colors' f n o chunk).get! k = (f (o + k / 4))[↑k]
case h f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 ⊢ (parallel_colors' f n o chunk).get! k = (f (o + k / 4))[↑k]
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
rw [parallel_colors']
case h f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 ⊢ (parallel_colors' f n o chunk).get! k = (f (o + k / 4))[↑k]
case h f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
by_cases h : n ≤ max 1 chunk
case h f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let t0 := Task.spawn fun ...
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
decide
f : ℕ → Color UInt8 n o chunk k : ℕ lt : k < n * 4 ⊢ ↑4 = 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simp only [h, if_true, Task.spawn]
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; let...
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ (push_colors f n o (ByteArray.mkEmpty n)).get! k = (f (o + k / 4))[↑k]
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
rw [get!_push_colors]
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ (push_colors f n o (ByteArray.mkEmpty n)).get! k = (f (o + k / 4))[↑k]
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ (if k < (ByteArray.mkEmpty n).size then (ByteArray.mkEmpty n).get! k else (f (o + (k - (ByteArray.mkEmpty n).size)...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simp only [ByteArray.size_mkEmpty, not_lt_zero', ↓reduceIte, tsub_zero]
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ (if k < (ByteArray.mkEmpty n).size then (ByteArray.mkEmpty n).get! k else (f (o + (k - (ByteArray.mkEmpty n).size)...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simpa only [ByteArray.size_mkEmpty, zero_add]
case pos.lt f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : n ≤ max 1 chunk ⊢ k < (ByteArray.mkEmpty n).size + n * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simp only [h, if_false, Task.spawn, ByteArray.get!_append, size_parallel_colors']
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : ¬n ≤ max 1 chunk ⊢ (if n ≤ max 1 chunk then push_colors f n o (ByteArray.mkEmpty n) else let n0 := n / 2; le...
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : ¬n ≤ max 1 chunk ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (n - n / 2) (o + n / ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simp only [le_max_iff, not_or, not_le] at h
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : ¬n ≤ max 1 chunk ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (n - n / 2) (o + n / ...
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (n - n / 2) (o + n /...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
by_cases c : k < n/2 * 4
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (n - n / 2) (o + n /...
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : k < n / 2 * 4 ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (n...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simp only [c, ↓reduceIte]
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : k < n / 2 * 4 ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (n...
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : k < n / 2 * 4 ⊢ (parallel_colors' f (n / 2) o chunk).get! k = (f (o + k / 4))[↑k]
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
rw [i _ (by omega) _ _ (by omega)]
case pos f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : k < n / 2 * 4 ⊢ (parallel_colors' f (n / 2) o chunk).get! k = (f (o + k / 4))[↑k]
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
omega
f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : k < n / 2 * 4 ⊢ n / 2 < n
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
omega
f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : k < n / 2 * 4 ⊢ k < n / 2 * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
simp only [c, ↓reduceIte]
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ (if k < n / 2 * 4 then (parallel_colors' f (n / 2) o chunk).get! k else (parallel_colors' f (...
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ (parallel_colors' f (n - n / 2) (o + n / 2) chunk).get! (k - n / 2 * 4) = (f (o + k / 4))[↑k]
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
rw [i]
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ (parallel_colors' f (n - n / 2) (o + n / 2) chunk).get! (k - n / 2 * 4) = (f (o + k / 4))[↑k]
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ (f (o + n / 2 + (k - n / 2 * 4) / 4))[↑(k - n / 2 * 4)] = (f (o + k / 4))[↑k] case neg.a f : ℕ →...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
have ke : o + n / 2 + (k - n / 2 * 4) / 4 = o + k / 4 := by omega
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ (f (o + n / 2 + (k - n / 2 * 4) / 4))[↑(k - n / 2 * 4)] = (f (o + k / 4))[↑k]
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ke : o + n / 2 + (k - n / 2 * 4) / 4 = o + k / 4 ⊢ (f (o + n / 2 + (k - n / 2 * 4) / 4))[↑(k - n / ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
rw [Nat.cast_sub (by omega), Nat.cast_mul, four, mul_zero, sub_zero, ke]
case neg f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ke : o + n / 2 + (k - n / 2 * 4) / 4 = o + k / 4 ⊢ (f (o + n / 2 + (k - n / 2 * 4) / 4))[↑(k - n / ...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
omega
f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ o + n / 2 + (k - n / 2 * 4) / 4 = o + k / 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
omega
f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ke : o + n / 2 + (k - n / 2 * 4) / 4 = o + k / 4 ⊢ n / 2 * 4 ≤ k
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
omega
case neg.a f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ n - n / 2 < n
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors'
[162, 1]
[183, 14]
omega
case neg.lt f : ℕ → Color UInt8 chunk : ℕ four : ↑4 = 0 n : ℕ i : ∀ m < n, ∀ (o k : ℕ), k < m * 4 → (parallel_colors' f m o chunk).get! k = (f (o + k / 4))[↑k] o k : ℕ lt : k < n * 4 h : 1 < n ∧ chunk < n c : ¬k < n / 2 * 4 ⊢ k - n / 2 * 4 < (n - n / 2) * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.size_parallel_colors
[185, 1]
[188, 53]
simp only [parallel_colors, size_parallel_colors']
f : ℕ → Color UInt8 n chunk : ℕ ⊢ (parallel_colors f n chunk).size = n * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get!_parallel_colors
[190, 1]
[193, 80]
simp only [parallel_colors, zero_add, get!_parallel_colors' f n 0 chunk k lt]
f : ℕ → Color UInt8 n chunk k : ℕ lt : k < n * 4 ⊢ (parallel_colors f n chunk).get! k = (f (k / 4))[↑k]
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.width_ofFn
[204, 1]
[205, 49]
rw [ofFn]
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ ⊢ (ofFn w h chunk f).width = w
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.height_ofFn
[206, 1]
[207, 50]
rw [ofFn]
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ ⊢ (ofFn w h chunk f).height = h
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
rw [get]
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height ⊢ (ofFn w h chunk f).get x y = f ↑x ↑y
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height ⊢ (let b := base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y; let_fun lt := ⋯; { r := (ofFn w h chunk f).data[b], g := (ofFn w h chunk f).data[b + 1], b := (ofFn w h chunk f).data[b + 2], ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
simp only [ByteArray.getElemNat_eq_get!]
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height ⊢ (let b := base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y; let_fun lt := ⋯; { r := (ofFn w h chunk f).data[b], g := (ofFn w h chunk f).data[b + 1], b := (ofFn w h chunk f).data[b + 2], ...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height ⊢ { r := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y), g := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y + 1), ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have xw := x.prop
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height ⊢ { r := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y), g := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y + 1), ...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < (ofFn w h chunk f).width ⊢ { r := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y), g := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have yh := y.prop
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < (ofFn w h chunk f).width ⊢ { r := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y), g := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn ...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < (ofFn w h chunk f).width yh : ↑y < (ofFn w h chunk f).height ⊢ { r := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y), g := (ofFn w h chunk f).data.get! (...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
simp only [width_ofFn, height_ofFn, Color.ext_iff] at xw yh ⊢
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < (ofFn w h chunk f).width yh : ↑y < (ofFn w h chunk f).height ⊢ { r := (ofFn w h chunk f).data.get! (base (ofFn w h chunk f).width (ofFn w h chunk f).height ↑x ↑y), g := (ofFn w h chunk f).data.get! (...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 2) =...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have w0 : 0 < w := by omega
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 2) =...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧ (ofFn w h chunk f).data.get! (base w h ↑...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have yh' : y ≤ h - 1 := by omega
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧ (ofFn w h chunk f).data.get! (base w h ↑...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧ (ofFn w h chunk f).data...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have m0 : ∀ x : Fin 4, (x * 4 : Fin 4) = 0 := by intro x have e : (4 : Fin 4) = 0 := rfl simp only [e, mul_zero]
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧ (ofFn w h chunk f).data...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have f0 : 0 < 4 := by norm_num
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f ↑x ↑y).g ∧...
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
refine ⟨?_, ?_, ?_, ?_⟩
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r ∧ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 1) = (f...
case refine_1 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y) = (f ↑x ↑y).r case refine_2 f : ℕ → ℕ → Color UInt8 w h chu...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
omega
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h ⊢ 0 < w
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
omega
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w ⊢ ↑y ≤ h - 1
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
intro x
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 ⊢ ∀ (x : Fin 4), x * 4 = 0
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x✝ : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x✝ < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 x : Fin 4 ⊢ x * 4 = 0
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have e : (4 : Fin 4) = 0 := rfl
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x✝ : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x✝ < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 x : Fin 4 ⊢ x * 4 = 0
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x✝ : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x✝ < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 x : Fin 4 e : 4 = 0 ⊢ x * 4 = 0
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
simp only [e, mul_zero]
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x✝ : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x✝ < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 x : Fin 4 e : 4 = 0 ⊢ x * 4 = 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
norm_num
f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 ⊢ 0 < 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
nth_rw 1 [ofFn]
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (ofFn w h chunk f).data.get! (base w h ↑x ↑y + 3) = (f ↑x ↑y).a
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ { data := parallel_colors (fun i => f (i % w) (h - 1 - i / w)) (h * w) chunk, width := w, height := h, ...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
simp only
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ { data := parallel_colors (fun i => f (i % w) (h - 1 - i / w)) (h * w) chunk, width := w, height := h, ...
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (parallel_colors (fun i => f (i % w) (h - 1 - i / w)) (h * w) chunk).get! (base w h ↑x ↑y + 3) = (f ↑x ↑y)...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
rw [get!_parallel_colors]
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (parallel_colors (fun i => f (i % w) (h - 1 - i / w)) (h * w) chunk).get! (base w h ↑x ↑y + 3) = (f ↑x ↑y)...
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (f ((base w h ↑x ↑y + 3) / 4 % w) (h - 1 - (base w h ↑x ↑y + 3) / 4 / w))[↑(base w h ↑x ↑y + 3)] = (f ↑x ↑...
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
simp [base, add_comm _ (x : ℕ), Nat.add_mul_div_right _ _ w0, Nat.div_eq_of_lt xw, Nat.sub_sub_self yh', Nat.mod_eq_of_lt xw, m0, add_comm (_ * 4), Nat.add_mul_div_right _ _ f0]
case refine_4 f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ (f ((base w h ↑x ↑y + 3) / 4 % w) (h - 1 - (base w h ↑x ↑y + 3) / 4 / w))[↑(base w h ↑x ↑y + 3)] = (f ↑x ↑...
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
have le := base_le xw yh
case refine_4.lt f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 ⊢ base w h ↑x ↑y + 3 < h * w * 4
case refine_4.lt f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 le : base w h ↑x ↑y + 4 ≤ h * w * 4 ⊢ base w h ↑x ↑y + 3 < h * w * 4
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Render/Image.lean
Image.get_ofFn
[209, 1]
[233, 14]
omega
case refine_4.lt f : ℕ → ℕ → Color UInt8 w h chunk : ℕ x : Fin (ofFn w h chunk f).width y : Fin (ofFn w h chunk f).height xw : ↑x < w yh : ↑y < h w0 : 0 < w yh' : ↑y ≤ h - 1 m0 : ∀ (x : Fin 4), x * 4 = 0 f0 : 0 < 4 le : base w h ↑x ↑y + 4 ≤ h * w * 4 ⊢ base w h ↑x ↑y + 3 < h * w * 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_lt_sq
[15, 1]
[15, 55]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ h : 0 < x ⊢ x ^ 2 > 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_gt_sq
[16, 1]
[16, 55]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ h : x > 0 ⊢ x ^ 2 > 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_mul
[17, 1]
[17, 67]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ p : x > 0 q : y > 0 ⊢ x * y > 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_div
[18, 1]
[18, 67]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ p : x > 0 q : y > 0 ⊢ x / y > 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_4
[19, 1]
[19, 37]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_7
[20, 1]
[20, 37]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 7
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_4_real
[21, 1]
[21, 48]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 4
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_7_real
[22, 1]
[22, 48]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 7
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_zero_one
[23, 1]
[23, 50]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 1
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_nnreal
[24, 1]
[24, 60]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ h : u > 0 ⊢ 0 < ↑u
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_pow
[25, 1]
[25, 41]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 2 ^ n
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pos_inv
[26, 1]
[26, 47]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 < 1⁻¹
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_abs
[34, 1]
[34, 39]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ Complex.abs z
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_abs_ge
[35, 1]
[35, 42]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ Complex.abs z ≥ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_nn_sq
[36, 1]
[36, 39]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ x ^ 2 ≥ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_mul
[37, 1]
[37, 63]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ p : x ≥ 0 q : y ≥ 0 ⊢ x * y ≥ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_div
[38, 1]
[38, 63]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ p : x ≥ 0 q : y ≥ 0 ⊢ x / y ≥ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_add
[39, 1]
[39, 63]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ p : x ≥ 0 q : y ≥ 0 ⊢ x + y ≥ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_nat
[40, 1]
[40, 41]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ ↑n ≥ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_num
[41, 1]
[41, 35]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ 7
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_num_real
[42, 1]
[42, 46]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ 7
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_zero_one
[43, 1]
[43, 46]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ 1
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_nnreal
[44, 1]
[44, 44]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ ↑u
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_zero
[45, 1]
[45, 42]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ 0
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_pow
[46, 1]
[46, 37]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ 2 ^ n
no goals
https://github.com/girving/ray.git
0be790285dd0fce78913b0cb9bddaffa94bd25f9
Ray/Tactic/BoundTests.lean
test_inv
[47, 1]
[47, 43]
bound
n : ℕ x y : ℝ u : ℝ≥0 z : ℂ ⊢ 0 ≤ 0⁻¹
no goals