import JaxLean.Stdlib import examples.tensor_puzzles.generated.PuzzlesBucketizeset_option maxRecDepth 4096set_option maxHeartbeats 2000000namespace JaxLean.Puzzles.Bucketizetheorem loop_spec (v boundaries : Tensor ℝ [3]) : Loop.bucketize v boundaries = fun i => if decide (v i ≥ boundaries (2, ())) then 3 else if decide (v i ≥ boundaries (1, ())) then 2 else if decide (v i ≥ boundaries (0, ())) then 1 else 0 := v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries = fun i => if decide (v i ≥ boundaries (2, ())) = true then 3 else if decide (v i ≥ boundaries (1, ())) = true then 2 else if decide (v i ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3u:Index []⊢ Loop.bucketize v boundaries (i, u) = if decide (v (i, u) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, u) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, u) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3⊢ Loop.bucketize v boundaries (i, PUnit.unit) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) = if decide (v ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) = if decide (v ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) = if decide (v ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) = if decide (v ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v ((fun i => i) ⟨0, ⋯⟩, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) = if decide (v ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v ((fun i => i) ⟨1, ⋯⟩, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Loop.bucketize v boundaries ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) = if decide (v ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v ((fun i => i) ⟨2, ⋯⟩, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 All goals completed! 🐙v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0⊢ max (max (cell 0) (cell 1)) (cell 2) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())h2:v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())h2:¬v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())h2:v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())h2:¬v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())h2:v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())h2:¬v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())h2:v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:v (i, ()) ≥ boundaries (1, ())h2:¬v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())h2:v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0v:Tensor ℝ [3]boundaries:Tensor ℝ [3]i:Fin 3cell:Fin 3 → ℝ := fun j => if decide (v (i, ()) ≥ boundaries (j, ())) = true then ↑↑j + 1 else 0h0:¬v (i, ()) ≥ boundaries (0, ())h1:¬v (i, ()) ≥ boundaries (1, ())h2:¬v (i, ()) ≥ boundaries (2, ())⊢ max (max (if decide (v (i, ()) ≥ boundaries (0, ())) = true then ↑0 + 1 else 0) (if decide (v (i, ()) ≥ boundaries (1, ())) = true then ↑1 + 1 else 0)) (if decide (v (i, ()) ≥ boundaries (2, ())) = true then 2 + 1 else 0) = if decide (v (i, PUnit.unit) ≥ boundaries (2, ())) = true then 3 else if decide (v (i, PUnit.unit) ≥ boundaries (1, ())) = true then 2 else if decide (v (i, PUnit.unit) ≥ boundaries (0, ())) = true then 1 else 0 All goals completed! 🐙v:Tensor ℝ [3]boundaries:Tensor ℝ [3]⊢ Array.bucketize v boundaries = Loop.bucketize v boundaries All goals completed! 🐙end JaxLean.Puzzles.Bucketize