case cons s_head s_tail =>
simp [TensorElem.flatten_list, shapeProd, List.foldr]
simp [motive_2 s_tail Hshape.2 (hasType_list_1 Htype)]
simp [shapeProd, Nat.mul_comm, Hshape.1]
τ : MLIRTy
l : List TensorElem
motive_2 :
  ∀ (s : List ℕ),
    (∀ (x : TensorElem), x ∈ l → hasShape x s = true) →
      ∀ (h : (List.all l fun x => hasType x τ) = true),
        List.length (List.join (mapWithType l flatten (_ : hasType (nested l) τ = true))) = List.length l * shapeProd s
Htype : hasType (nested l) τ = true
s_head : ℕ
s_tail : List ℕ
Hshape : List.length l = s_head ∧ ∀ (x : TensorElem), x ∈ l → hasShape x s_tail = true
⊢ List.length (flatten (nested l) Htype) = shapeProd (s_head :: s_tail)
no goals